Disable clang's -Wnested-anon-types to remove piles of warnings from a Clang -pedantic selfhost

Eric Christopher echristo at gmail.com
Thu Jan 31 11:24:35 PST 2013


Cool. Have at.

-eric


On Wed, Jan 30, 2013 at 5:58 PM, Richard Smith <richard at metafoo.co.uk>wrote:

> Hi,
>
> The attached patch adds -Wno-nested-anon-types to -pedantic builds of
> LLVM. This warning catches uses of an extremely minor C++ extension,
> which is supported by basically every existing C++ compiler (although
> EDG also diagnoses it, and rejects it in its strict mode). The code
> pattern looks like:
>
> struct X {
>   union {
>     struct {
>       int a;
>       int b;
>     } S;
>   };
> };
>
> This is ill-formed, because it is not valid to define types within an
> anonymous union.
>
> Thanks!
> Richard
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130131/b8182796/attachment.html>


More information about the llvm-commits mailing list