summaryrefslogtreecommitdiff
path: root/src/base/compiler.hh
diff options
context:
space:
mode:
authorMitch Hayenga <mitch.hayenga@arm.com>2014-03-07 15:56:23 -0500
committerMitch Hayenga <mitch.hayenga@arm.com>2014-03-07 15:56:23 -0500
commitb9a9d99b226768dc972f0c40488f332066396e69 (patch)
tree711545134b14d63a51c096da0f5a2e7811c7b4fc /src/base/compiler.hh
parentbef2086f5bb1ef350181791c6dff14d0964a5680 (diff)
downloadgem5-b9a9d99b226768dc972f0c40488f332066396e69.tar.xz
scons: Fixes uninitialized warnings issued by clang
Small fixes to appease recent clang versions.
Diffstat (limited to 'src/base/compiler.hh')
-rw-r--r--src/base/compiler.hh7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/base/compiler.hh b/src/base/compiler.hh
index 7176537d2..a16667d8d 100644
--- a/src/base/compiler.hh
+++ b/src/base/compiler.hh
@@ -50,6 +50,13 @@
#define M5_PRAGMA_NORETURN(x)
#define M5_DUMMY_RETURN
#define M5_VAR_USED __attribute__((unused))
+
+#if defined(__clang__)
+#define M5_CLASS_VAR_USED M5_VAR_USED
+#else
+#define M5_CLASS_VAR_USED
+#endif
+
#define M5_ATTR_PACKED __attribute__ ((__packed__))
#define M5_NO_INLINE __attribute__ ((__noinline__))
#else