This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix r242743 change of gcc/system.h
- From: Gunther Nikl <gnikl at justmail dot de>
- To: Paolo Bonzini <bonzini at gnu dot org>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 19 Mar 2017 22:17:37 +0100
- Subject: [PATCH] Fix r242743 change of gcc/system.h
- Authentication-results: sourceware.org; auth=none
Hello Paolo!
Building older GCC releases with clang tends to issue warnings. This
can be annoying especially when they originate from a header. While
backporting r242743 I noticed that the non-C++ cases of the changed
macro definitions in gcc/system.h are broken. Since GCC trunk is build
in C++ mode this is not an issue, but should be fixed nevertheless I
think.
Regards,
Gunther
gcc:
2017-03-XX Gunther Nikl <gnikl@users.sourceforge.net>
* system.h (HAVE_DESIGNATED_INITIALIZERS,
HAVE_DESIGNATED_UNION_INITIALIZERS): Fix non C++ case.
Index: gcc/system.h
===================================================================
--- gcc/system.h (revision 246106)
+++ gcc/system.h (working copy)
@@ -581,7 +581,7 @@ extern int vsnprintf (char *, size_t, const char *
#define HAVE_DESIGNATED_INITIALIZERS 0
#else
#define HAVE_DESIGNATED_INITIALIZERS \
- (((GCC_VERSION >= 2007) || (__STDC_VERSION__ >= 199901L))
+ ((GCC_VERSION >= 2007) || (__STDC_VERSION__ >= 199901L))
#endif
#endif
@@ -590,7 +590,7 @@ extern int vsnprintf (char *, size_t, const char *
#define HAVE_DESIGNATED_UNION_INITIALIZERS (GCC_VERSION >= 4007)
#else
#define HAVE_DESIGNATED_UNION_INITIALIZERS \
- (((GCC_VERSION >= 2007) || (__STDC_VERSION__ >= 199901L))
+ ((GCC_VERSION >= 2007) || (__STDC_VERSION__ >= 199901L))
#endif
#endif