systemc: Disable 'overloaded-virtual' warn for systemc bind funcs

For GCC >=v13 systemc was breaking due to the overloaded virtual
warning check.

Issue: #1121
This commit is contained in:
Bobby R. Bruce
2024-09-18 00:36:05 -07:00
parent 8aa58714c4
commit 0bd2cfaf53

View File

@@ -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.