]> sourceware.org Git - newlib-cygwin.git/commitdiff
merge from gcc
authorDJ Delorie <dj@redhat.com>
Tue, 18 Dec 2012 17:41:27 +0000 (17:41 +0000)
committerDJ Delorie <dj@redhat.com>
Tue, 18 Dec 2012 17:41:27 +0000 (17:41 +0000)
include/ChangeLog
include/ansidecl.h

index eecc16d04f715985953b29799608bef2ea35ef11..4be13bc5b31e874a91d1c1e1618d9cf4db6e18a8 100644 (file)
@@ -1,3 +1,9 @@
+2012-12-18  Aldy Hernandez  <aldyh@redhat.com>
+
+       PR other/54324
+       * ansidecl.h (ATTRIBUTE_UNUSED): Do not set __attribute__ for GCC
+       < 3.4.
+
 2012-12-17  Nick Clifton  <nickc@redhat.com>
 
        * MAINTAINERS: Add copyright notice.
index 23d85bf0e1617bebd508e0dbd3e0bd3748d5614b..40f4a5fea42a07cf25877fff29679c7267496257 100644 (file)
@@ -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
This page took 0.032426 seconds and 5 git commands to generate.