diff options
author | bernie <bernie@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-24 17:49:27 +0000 |
---|---|---|
committer | bernie <bernie@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-24 17:49:27 +0000 |
commit | 001ad2d459f7dd38d03ff0fe356139595cc6c7b6 (patch) | |
tree | 943282c2e8e72959ccfb15c920934949414de97f /include/ansidecl.h | |
parent | 6c9c7c579600631d19740329e40d8dca93c0f90e (diff) | |
download | gcc-001ad2d459f7dd38d03ff0fe356139595cc6c7b6.tar.gz |
* ansidecl.h (ARG_UNUSED): New Macro.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85120 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'include/ansidecl.h')
-rw-r--r-- | include/ansidecl.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/ansidecl.h b/include/ansidecl.h index 4b3eae9d887..ccf0b2757ae 100644 --- a/include/ansidecl.h +++ b/include/ansidecl.h @@ -264,6 +264,14 @@ So instead we use the macro below and test it against specific values. */ #define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #endif /* ATTRIBUTE_UNUSED */ +/* Before GCC 3.4, the C++ frontend couldn't parse attributes placed after the + identifier name. */ +#if ! defined(__cplusplus) || (GCC_VERSION >= 3004) +# define ARG_UNUSED(NAME) NAME ATTRIBUTE_UNUSED +#else /* !__cplusplus || GNUC >= 3.4 */ +# define ARG_UNUSED(NAME) NAME +#endif /* !__cplusplus || GNUC >= 3.4 */ + #ifndef ATTRIBUTE_NORETURN #define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) #endif /* ATTRIBUTE_NORETURN */ |