diff --git a/src/systemc/ext/tlm_core/2/sockets/target_socket.hh b/src/systemc/ext/tlm_core/2/sockets/target_socket.hh index 5a0e5ff9ef..5da81d892e 100644 --- a/src/systemc/ext/tlm_core/2/sockets/target_socket.hh +++ b/src/systemc/ext/tlm_core/2/sockets/target_socket.hh @@ -91,6 +91,17 @@ class tlm_base_target_socket : // - Binds the port of the target socket to the export of the initiator // socket // + +#pragma GCC diagnostic push +/** + * The following warning is disabled because the bind methods are overloaded + * in the derived class and the base class. In GCC v13+ this + * 'overloaded-virtual' warning is strict enough to trigger here (though the + * code is correct). + */ +#if defined(__GNUC__) && (__GNUC__ >= 13) +#pragma GCC diagnostic ignored "-Woverloaded-virtual" +#endif virtual void bind(base_initiator_socket_type &s) { @@ -133,6 +144,7 @@ class tlm_base_target_socket : } void operator () (fw_interface_type &s) { bind(s); } +#pragma GCC diagnostic pop // // Forward to 'size()' of port class.