diff options
author | DJ Delorie <dj@delorie.com> | 2012-12-18 17:41:27 +0000 |
---|---|---|
committer | DJ Delorie <dj@delorie.com> | 2012-12-18 17:41:27 +0000 |
commit | 6c9f4555290253dd18448daefe916fc599bbc284 (patch) | |
tree | 92e4778196af7c1fd7abbbc7863c42e530bd5a8f /include/ansidecl.h | |
parent | 35536fe440b343a176f4a3bca816f66aaa685381 (diff) | |
download | gdb-6c9f4555290253dd18448daefe916fc599bbc284.tar.gz |
merge from gcc
Diffstat (limited to 'include/ansidecl.h')
-rw-r--r-- | include/ansidecl.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/ansidecl.h b/include/ansidecl.h index 23d85bf0e16..40f4a5fea42 100644 --- a/include/ansidecl.h +++ b/include/ansidecl.h @@ -279,8 +279,15 @@ So instead we use the macro below and test it against specific values. */ # endif #endif +/* Similarly to ARG_UNUSED below. Prior to GCC 3.4, the C++ frontend + couldn't parse attributes placed after the identifier name, and now + the entire compiler is built with C++. */ #ifndef ATTRIBUTE_UNUSED -#define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) +#if GCC_VERSION >= 3004 +# define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) +#else +#define ATTRIBUTE_UNUSED +#endif #endif /* ATTRIBUTE_UNUSED */ /* Before GCC 3.4, the C++ frontend couldn't parse attributes placed after the |