diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2012-12-18 15:19:43 +0000 |
---|---|---|
committer | Aldy Hernandez <aldyh@gcc.gnu.org> | 2012-12-18 15:19:43 +0000 |
commit | 9654e9c299a49165ead24c6c2fa773f44ea5d100 (patch) | |
tree | 25ecd732d665c371bdcd93e5a671ac3b556de254 /include/ansidecl.h | |
parent | 867fdd05e4de59b21ea5fec6182127404cc94712 (diff) | |
download | gcc-9654e9c299a49165ead24c6c2fa773f44ea5d100.zip gcc-9654e9c299a49165ead24c6c2fa773f44ea5d100.tar.gz gcc-9654e9c299a49165ead24c6c2fa773f44ea5d100.tar.bz2 |
re PR other/54324 (GCC install document does not list minimum required g++ version)
PR other/54324
* ansidecl.h (ATTRIBUTE_UNUSED): Do not set __attribute__ for GCC
< 3.4.
From-SVN: r194583
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 23d85bf..40f4a5f 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 |