[cfe-commits] r150625 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Initialization.h lib/Sema/SemaInit.cpp test/Misc/warning-flags.c test/SemaCXX/cxx0x-initializer-aggregates.cpp

Richard Smith richard at metafoo.co.uk
Wed Feb 15 15:39:19 PST 2012


On Wed, Feb 15, 2012 at 2:49 PM, Eli Friedman <eli.friedman at gmail.com>wrote:

> On Wed, Feb 15, 2012 at 2:38 PM, Richard Smith
> <richard-llvm at metafoo.co.uk> wrote:
> > Author: rsmith
> > Date: Wed Feb 15 16:38:09 2012
> > New Revision: 150625
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=150625&view=rev
> > Log:
> > Support GCC's bug^Wextension allowing class array members to be
> initalized by a
> > parenthesized braced-init-list in the base/member initialization list.
> >
> > Modified:
> >    cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
> >    cfe/trunk/include/clang/Sema/Initialization.h
> >    cfe/trunk/lib/Sema/SemaInit.cpp
> >    cfe/trunk/test/Misc/warning-flags.c
> >    cfe/trunk/test/SemaCXX/cxx0x-initializer-aggregates.cpp
> >
> > Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
> > URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=150625&r1=150624&r2=150625&view=diff
> >
> ==============================================================================
> > --- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
> > +++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Wed Feb 15
> 16:38:09 2012
> > @@ -3550,7 +3550,10 @@
> >   "cannot initialize array of type %0 with non-constant array of type
> %1">;
> >  def ext_array_init_copy : Extension<
> >   "initialization of an array of type %0 from a compound literal of type
> %1 is "
> > -  "a GNU extension">;
> > +  "a GNU extension">, InGroup<GNU>;
> > +def ext_array_init_parens : ExtWarn<
> > +  "parenthesized initialization of a member array is a GNU extension">,
> > +  InGroup<GNU>;
>
> Can you put this in a more specific warning group, and make it
> DefaultError?  Since only very new gcc versions accept this, we really
> want to discourage anyone from using it.


Sure thing. Do you want it in a subgroup of -Wgnu, or do you want for
-Wno-gnu to leave this enabled?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120215/15ce4371/attachment.html>


More information about the cfe-commits mailing list