From 54458b125bd52c3735063bcbac6e07984c29db05 Mon Sep 17 00:00:00 2001 From: Jui-min Lee Date: Thu, 19 Dec 2019 18:10:06 +0800 Subject: [PATCH] systemc: Fix tlm2 socket integration This change will make the systemc extension in gem5 more compatible to the reference implementation by Accellera. * Remove the alias of sc_port's bind in initiator socket. * Ignore -Woverloaded-virtual in initiator socket. Change-Id: I229e4d493e01d26174c5662ad71d4859d546d307 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23864 Tested-by: kokoro Reviewed-by: Gabe Black Maintainer: Gabe Black --- src/systemc/ext/tlm_core/2/sockets/initiator_socket.hh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/systemc/ext/tlm_core/2/sockets/initiator_socket.hh b/src/systemc/ext/tlm_core/2/sockets/initiator_socket.hh index 35c650bce..4f67b5923 100644 --- a/src/systemc/ext/tlm_core/2/sockets/initiator_socket.hh +++ b/src/systemc/ext/tlm_core/2/sockets/initiator_socket.hh @@ -51,6 +51,10 @@ template class tlm_base_target_socket; +// The overloaded virtual is intended in SystemC, so we'll disable the warning. +// Please check section 9.3 of SystemC 2.3.1 release note for more details. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Woverloaded-virtual" template , typename BW_IF=tlm_bw_transport_if<>, int N=1, sc_core::sc_port_policy POL=sc_core::SC_ONE_OR_MORE_BOUND> @@ -120,8 +124,6 @@ class tlm_base_initiator_socket : (s.get_base_export())(get_base_export()); } - using port_type::bind; - void operator() (base_type &s) { bind(s); } // @@ -172,6 +174,7 @@ class tlm_base_initiator_socket : protected: export_type m_export; }; +#pragma GCC diagnostic pop // // Convenience socket classes -- 2.30.2