This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] ansidecl C++ compatiblity


Just looking a bit further down in the file this patch is treating will
reveal how this is just bringing the conditionals in line with each other.
Actually the comment in the context on the last line of this patch explains
it as well. Please apply.


diff -urN gcc-4.0-20050123/include/ansidecl.h gcc-4.0-20050123-new/include/ansidecl.h
--- gcc-4.0-20050123/include/ansidecl.h Sun Sep 5 04:49:55 2004
+++ gcc-4.0-20050123-new/include/ansidecl.h Thu Jan 27 16:53:24 2005
@@ -261,7 +261,11 @@
#endif /* ATTRIBUTE_UNUSED_LABEL */


 #ifndef ATTRIBUTE_UNUSED
-#define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
+# if !defined(__cplusplus) || (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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]