aboutsummaryrefslogtreecommitdiff
path: root/include/ansidecl.h
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2004-07-24 18:04:39 +0000
committerDJ Delorie <dj@redhat.com>2004-07-24 18:04:39 +0000
commitd5b4094f381410813c8eaceae0d71f9c11394bf4 (patch)
treea04cf7c56d4f10dc36881f638f94a35c6999d5e3 /include/ansidecl.h
parentb4632131601c0c375c1c571b5671fca4176979ae (diff)
downloadfsf-binutils-gdb-d5b4094f381410813c8eaceae0d71f9c11394bf4.zip
fsf-binutils-gdb-d5b4094f381410813c8eaceae0d71f9c11394bf4.tar.gz
fsf-binutils-gdb-d5b4094f381410813c8eaceae0d71f9c11394bf4.tar.bz2
merge from gcc
Diffstat (limited to 'include/ansidecl.h')
-rw-r--r--include/ansidecl.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/ansidecl.h b/include/ansidecl.h
index 4b3eae9..ccf0b27 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 */