aboutsummaryrefslogtreecommitdiff
path: root/include/ansidecl.h
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2012-12-18 17:41:27 +0000
committerDJ Delorie <dj@redhat.com>2012-12-18 17:41:27 +0000
commitddd27bdefd50ed4b0c0f7e5aa183f4f87c5461e2 (patch)
tree338dec7b638d39a9eedc17bd89761934daeace06 /include/ansidecl.h
parent886e427f80b5affa2b54287a10e749675d0214c2 (diff)
downloadbinutils-ddd27bdefd50ed4b0c0f7e5aa183f4f87c5461e2.zip
binutils-ddd27bdefd50ed4b0c0f7e5aa183f4f87c5461e2.tar.gz
binutils-ddd27bdefd50ed4b0c0f7e5aa183f4f87c5461e2.tar.bz2
merge from gcc
Diffstat (limited to 'include/ansidecl.h')
-rw-r--r--include/ansidecl.h9
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