[cfe-commits] [Patch] Anonymous struct/union is not an extension in C11

Eli Friedman eli.friedman at gmail.com
Mon Jan 23 09:13:05 PST 2012


On Mon, Jan 23, 2012 at 6:54 AM, Hans Wennborg <hans at chromium.org> wrote:
> Hi all,
>
> The attached patch makes sure Clang doesn't warn about anonymous
> struct/union with -pedantic in C11.
>
> Please let me know if it is ok to land.

We don't actually quite implement what C11 requires; for example, we
reject the following:

struct s {
struct { int i; };
int a[];
};

I guess this is okay as a starting point, though.

-Eli



More information about the cfe-commits mailing list