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

Richard Smith richard at metafoo.co.uk
Wed Jan 30 17:58:41 PST 2013


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: disable-Wnested-anon-types.diff
Type: application/octet-stream
Size: 4815 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130130/bf7f4c67/attachment.obj>


More information about the llvm-commits mailing list