On Wed, Feb 15, 2012 at 3:39 PM, Richard Smith <[email protected]> wrote: > On Wed, Feb 15, 2012 at 2:49 PM, Eli Friedman <[email protected]> > wrote: >> >> On Wed, Feb 15, 2012 at 2:38 PM, Richard Smith >> <[email protected]> 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?
-Wno-gnu should probably leave this enabled. Assuming this issue has been reported against gcc, I think they're likely to fix it rather than leave it in as an extension. -Eli _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
