[cfe-dev] Next batch of -Wgnu flags

Richard Smith richard at metafoo.co.uk
Thu Aug 29 18:51:29 PDT 2013


On Thu, Aug 29, 2013 at 3:56 PM, Eli Friedman <eli.friedman at gmail.com>wrote:

> On Thu, Aug 22, 2013 at 11:15 PM, Peter N Lewis <peter at stairways.com.au>wrote:
>
>> I'm currently waiting for approval or feedback on adding the following
>> GNU flags in the -Wgnu group:
>>
>> gnu-binary-literal
>>
>
This is also a C++1y language extension; we should put it under
-Wc++1y-extensions in C++ mode, and under -Wgnu-binary-literal in C mode.


> gnu-imaginary-constant
>> gnu-line-zero-directive
>>
>
Maybe -Wgnu-#line-0? (We have precedent for # in a warning name:
-W#warnings, -W#pragma-messages)


> gnu-token-pasting-comma
>> gnu-zero-variadic-macro-arguments
>>
>
These two are the definition and use side of the same feature, so should
probably live under the same flag.

And then the next batch of names (which I've done already) is:
>>
>> gnu-anonymous-struct
>> gnu-compound-literal-initializer
>> gnu-empty-struct
>> gnu-flexible-array-initializer
>> gnu-flexible-array-union-member
>> gnu-folding-initializer-constant
>> gnu-folding-integer-constant
>> gnu-only-flexible-array-member
>> gnu-redeclared-class-member
>> gnu-redeclaration-enum
>> gnu-struct-without-named-member
>> gnu-union-cast
>> gnu-variable-sized-type-not-at-end
>>
>
> gnu-empty-struct, gnu-struct-without-named-member, and
> gnu-only-flexible-array-member are all variants of the same extension
> (allowing structs without a named member); it probably makes sense to put
> them all under gnu-empty-struct.
>
> gnu-folding-initializer-constant and gnu-folding-integer-constant are also
> variants of the same extension (along with ext_vla_folded_to_constant)
>
> gnu-redeclared-class-member probably shouldn't have "gnu" in the name;
> it's not really an intentional extension.
>
> (This isn't a formal review; please continue to submit patches as you have
> been doing.)
>
> -Eli
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130829/d8fd852b/attachment.html>


More information about the cfe-dev mailing list