diff options
author | Andreas Sandberg <Andreas.Sandberg@ARM.com> | 2015-02-11 10:23:24 -0500 |
---|---|---|
committer | Andreas Sandberg <Andreas.Sandberg@ARM.com> | 2015-02-11 10:23:24 -0500 |
commit | 9e6f803254cbf3f5f491775debdc6593c3329da8 (patch) | |
tree | 0fa1a55ac41adcb2c3c1a61dd0b5aa9c9d897ee3 /src/base | |
parent | c9b8616c515f7689baf0706a9c17d3f9d625ef04 (diff) | |
download | gem5-9e6f803254cbf3f5f491775debdc6593c3329da8.tar.xz |
base: Add compiler macros to add deprecation warnings
Gcc and clang both provide an attribute that can be used to flag a
function as deprecated at compile time. This changeset adds a gem5
compiler macro for that compiler feature. The macro can be used to
indicate that a legacy API within gem5 has been deprecated and provide
a graceful migration to the new API.
Diffstat (limited to 'src/base')
-rw-r--r-- | src/base/compiler.hh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/base/compiler.hh b/src/base/compiler.hh index b1fea055c..1a104dd87 100644 --- a/src/base/compiler.hh +++ b/src/base/compiler.hh @@ -80,6 +80,8 @@ # define M5_VAR_USED __attribute__((unused)) # define M5_ATTR_PACKED __attribute__ ((__packed__)) # define M5_NO_INLINE __attribute__ ((__noinline__)) +# define M5_DEPRECATED __attribute__((deprecated)) +# define M5_DEPRECATED_MSG(MSG) __attribute__((deprecated(MSG))) #endif #if defined(__clang__) |