* ansidecl.h (ATTRIBUTE_UNUSED_LABEL): Define for C++.
authorIan Lance Taylor <ian@gcc.gnu.org>
Wed, 10 Jun 2009 01:48:14 +0000 (01:48 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Wed, 10 Jun 2009 01:48:14 +0000 (01:48 +0000)
From-SVN: r148333

include/ChangeLog
include/ansidecl.h

index 4693ff9a5984f108efda7cf7fb1adcb39d7e7ad6..b680b436b003577df7f29f998af9e7e38e613193 100644 (file)
@@ -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.
 
index f9864cd386424ece83ec45dda3d2a2d27ae51bf2..86b094474825708040abe56ad06f4ff7793f07f8 100644 (file)
@@ -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__))