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

Chandler Carruth chandlerc at google.com
Sat Jan 15 16:10:21 PST 2011


On Sat, Jan 15, 2011 at 2:37 PM, Andrey Valyaev <dron at osrc.info> 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
>

Yes, Clang supports designated initializers in C++ as an extension.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110115/91ab7e4e/attachment.html>


More information about the cfe-dev mailing list