summaryrefslogtreecommitdiff
path: root/src/systemc/ext/core/sc_module.hh
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-11-02 15:30:41 -0700
committerGabe Black <gabeblack@google.com>2018-11-05 23:09:01 +0000
commit45abd002b6072469faf98008304c33961d1d9e6b (patch)
treed43046e3522933cd7e1aa0005d5864c14541628d /src/systemc/ext/core/sc_module.hh
parent28ab6ff6878dbaeec2c0a4dd1f6eaf2a244cd74e (diff)
downloadgem5-45abd002b6072469faf98008304c33961d1d9e6b.tar.xz
systemc: Change how SC_BIND_PROXY_NIL is initialized.
The previous implementation dereferenced a null pointer to create a reference which would then have its address taken in the sc_bind_proxy constructor. clang says that that uses undefined behavior, so this change adds a default constructor which initializes the two contained pointers to null explicitly. We have to hope systemc code doesn't play around with sc_bind_proxy too much and doesn't accidentally use this constructor unintentionally, but it seems like the least bad possible solution which makes clang happy. Change-Id: Ic59603495fe7a406586a18ce44de979f84089bcd Reviewed-on: https://gem5-review.googlesource.com/c/13879 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc/ext/core/sc_module.hh')
-rw-r--r--src/systemc/ext/core/sc_module.hh1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/systemc/ext/core/sc_module.hh b/src/systemc/ext/core/sc_module.hh
index dea728fba..0c8bd9f6c 100644
--- a/src/systemc/ext/core/sc_module.hh
+++ b/src/systemc/ext/core/sc_module.hh
@@ -82,6 +82,7 @@ class sc_bind_proxy
sc_port_base *_port;
public:
+ sc_bind_proxy();
sc_bind_proxy(sc_interface &_interface);
sc_bind_proxy(sc_port_base &_port);