ext: Fix GCC v13+ comp of systemc due to problematic overloaded-virtual warn (#1576)

Fixes #1121 in line with the following suggesting:

https://github.com/gem5/gem5/issues/1121#issuecomment-2352743409
This commit is contained in:
Bobby R. Bruce
2024-09-26 14:32:20 -07:00
committed by GitHub
2 changed files with 13 additions and 1 deletions

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.