diff options
author | Mitch Hayenga <mitch.hayenga@arm.com> | 2014-03-07 15:56:23 -0500 |
---|---|---|
committer | Mitch Hayenga <mitch.hayenga@arm.com> | 2014-03-07 15:56:23 -0500 |
commit | b9a9d99b226768dc972f0c40488f332066396e69 (patch) | |
tree | 711545134b14d63a51c096da0f5a2e7811c7b4fc /src/base | |
parent | bef2086f5bb1ef350181791c6dff14d0964a5680 (diff) | |
download | gem5-b9a9d99b226768dc972f0c40488f332066396e69.tar.xz |
scons: Fixes uninitialized warnings issued by clang
Small fixes to appease recent clang versions.
Diffstat (limited to 'src/base')
-rw-r--r-- | src/base/compiler.hh | 7 |
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 |