summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2009-06-10 01:48:14 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2009-06-10 01:48:14 +0000
commit5741047ef3d6bd21528067e7ff6b0af43efc5614 (patch)
treec2279cb23620d647eabfe122a7d3ba66a36b5125 /include
parent5877080194308ecc09a50e4b57a3567f9087c151 (diff)
downloadgcc-5741047ef3d6bd21528067e7ff6b0af43efc5614.tar.gz
* ansidecl.h (ATTRIBUTE_UNUSED_LABEL): Define for C++.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148333 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'include')
-rw-r--r--include/ChangeLog6
-rw-r--r--include/ansidecl.h21
2 files changed, 20 insertions, 7 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index 4693ff9a598..b680b436b00 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,4 +1,8 @@
-2009-06-02 Ian Lance Taylor <iant@google.com>
+2009-06-09 Ian Lance Taylor <ian@airs.com>
+
+ * ansidecl.h (ATTRIBUTE_UNUSED_LABEL): Define for C++.
+
+2009-06-03 Ian Lance Taylor <iant@google.com>
* ansidecl.h (EXPORTED_CONST): Define.
diff --git a/include/ansidecl.h b/include/ansidecl.h
index f9864cd3864..86b09447482 100644
--- a/include/ansidecl.h
+++ b/include/ansidecl.h
@@ -261,14 +261,23 @@ So instead we use the macro below and test it against specific values. */
# endif /* GNUC >= 2.96 */
#endif /* ATTRIBUTE_MALLOC */
-/* Attributes on labels were valid as of gcc 2.93. */
+/* Attributes on labels were valid as of gcc 2.93 and g++ 4.5. For
+ g++ an attribute on a label must be followed by a semicolon. */
#ifndef ATTRIBUTE_UNUSED_LABEL
-# if (!defined (__cplusplus) && GCC_VERSION >= 2093)
-# define ATTRIBUTE_UNUSED_LABEL ATTRIBUTE_UNUSED
+# ifndef __cplusplus
+# if GCC_VERSION >= 2093
+# define ATTRIBUTE_UNUSED_LABEL ATTRIBUTE_UNUSED
+# else
+# define ATTRIBUTE_UNUSED_LABEL
+# endif
# else
-# define ATTRIBUTE_UNUSED_LABEL
-# endif /* !__cplusplus && GNUC >= 2.93 */
-#endif /* ATTRIBUTE_UNUSED_LABEL */
+# if GCC_VERSION >= 4005
+# define ATTRIBUTE_UNUSED_LABEL ATTRIBUTE_UNUSED ;
+# else
+# define ATTRIBUTE_UNUSED_LABEL
+# endif
+# endif
+#endif
#ifndef ATTRIBUTE_UNUSED
#define ATTRIBUTE_UNUSED __attribute__ ((__unused__))