[cfe-dev] c99 Designated Initializers work in clang++

Chris Lattner clattner at apple.com
Sat Jan 15 16:34:16 PST 2011


On Jan 15, 2011, at 2:37 PM, Andrey Valyaev wrote:

> struct foo {
>        int a;
>        int b;
> };
> 
> const foo f = { .a = 10, .b = 11 };
> 
> Should not be work.
> It cause error in gcc.
> But compiled without warnings in clang++ 2.8

There is a bug here, we don't emit an extwarn when -pedantic is specified.

-Chris



More information about the cfe-dev mailing list