aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBernardo Innocenti <bernie@develer.com>2004-07-24 17:49:27 +0000
committerBernardo Innocenti <bernie@develer.com>2004-07-24 17:49:27 +0000
commit5f06dd3aca04994b813eaea6a81535833ae90f91 (patch)
tree943282c2e8e72959ccfb15c920934949414de97f /include
parentbad88123ea167d645664f778d957e3eb328b4d68 (diff)
* ansidecl.h (ARG_UNUSED): New Macro.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@85120 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'include')
-rw-r--r--include/ChangeLog10
-rw-r--r--include/ansidecl.h8
2 files changed, 15 insertions, 3 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index 8f714da9547..e62b3628190 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,14 +1,18 @@
-2004-07-21 Paolo Bonzini <bonzini@gnu.org>
+2004-07-24 Bernardo Innocenti <bernie@develer.com>
- * ansidecl.h (ATTRIBUTE_PURE): New.
+ * ansidecl.h (ARG_UNUSED): New Macro.
-2004-07-13 Bernardo Innocenti <bernie@develer.com>
+2004-07-24 Bernardo Innocenti <bernie@develer.com>
* libiberty.h (XNEW, XCNEW, XNEWVEC, XCNEWVEC, XOBNEW): Move here from
libcpp/internal.h.
(XDELETE, XRESIZEVEC, XDELETEVEC, XNEWVAR, XCNEWVAR, XRESIZEVAR): New
macros.
+2004-07-21 Paolo Bonzini <bonzini@gnu.org>
+
+ * ansidecl.h (ATTRIBUTE_PURE): New.
+
2004-07-13 Bernardo Innocenti <bernie@develer.com>
* libiberty.h (ASTRDUP): Add casts required for stricter
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 */