Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warning: 'cci::cci_param_typed<double>::register_post_read_callback' hides overloaded virtual function #321

Open
eactor opened this issue Mar 3, 2025 · 0 comments

Comments

@eactor
Copy link

eactor commented Mar 3, 2025

cci_param_typed vs cci_param_untyped

cci/cfg/cci_param_typed.h:339:33: warning: 'cci::cci_param_typed::register_post_read_callback' hides overloaded virtual function [-Woverloaded-virtual]

/cci/cfg/cci_param_untyped.h:446:5: note: hidden overloaded virtual function 'cci::cci_param_untyped::register_post_read_callback' declared here: type mismatch at 1st parameter ('const cci_callback_untyped_handle &' vs 'const cci_param_post_read_callback_typed &' (aka 'const cci::cci_callback<const cci::cci_param_read_event &> &'))
register_post_read_callback(const cci_callback_untyped_handle &cb

This is probably intended and should be silenced: (taken from SystemC src/tlm_core/tlm_2/tlm_sockets/tlm_initiator_socket.h)

#if defined(__clang__) || \
   (defined(__GNUC__) && ((__GNUC__ * 1000 + __GNUC_MINOR__) >= 4006))
// ignore warning about deliberately hidden "bind()" overloads
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Woverloaded-virtual"
#endif

...

#if defined(__clang__) || \
   (defined(__GNUC__) && ((__GNUC__ * 1000 + __GNUC_MINOR__) >= 4006))
#pragma GCC diagnostic pop
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant