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 | 625f142346b1e3b1e55a040c11a5415f633d47b5 (patch) | |
tree | c9de80fc66bcf2c740cda40e85293abc3ddaa36e /include | |
parent | 19e05575d97b6dc83dae1b8309624da3102d7a74 (diff) | |
download | binutils-redhat-625f142346b1e3b1e55a040c11a5415f633d47b5.tar.gz |
merge from gcc
Diffstat (limited to 'include')
-rw-r--r-- | include/ChangeLog | 6 | ||||
-rw-r--r-- | include/ansidecl.h | 9 |
2 files changed, 14 insertions, 1 deletions
diff --git a/include/ChangeLog b/include/ChangeLog index eecc16d04f..4be13bc5b3 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,9 @@ +2012-12-18 Aldy Hernandez <aldyh@redhat.com> + + PR other/54324 + * ansidecl.h (ATTRIBUTE_UNUSED): Do not set __attribute__ for GCC + < 3.4. + 2012-12-17 Nick Clifton <nickc@redhat.com> * MAINTAINERS: Add copyright notice. diff --git a/include/ansidecl.h b/include/ansidecl.h index 23d85bf0e1..40f4a5fea4 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 |