This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix r242743 change of gcc/system.h
Paolo Bonzini <bonzini@gnu.org>:
>
> On 19/03/2017 22:17, Gunther Nikl wrote:
> > 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
>
> Of course! If you have commit access, you can commit this as obvious
> I think.
No, I don't have commit access. Please commit the patch for me. Thanks.
> What is the warning like?
Sorry, I don't have the warning available :-/ I noticed that there
appears to be a problem because of a patch to the FreeBSD sources back
in September of the last year.
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