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

İsmail Dönmez ismail at namtrac.org
Sat Jan 15 14:40:59 PST 2011


Hi;

On Sun, Jan 16, 2011 at 12:37 AM, Andrey Valyaev <dron at osrc.info> wrote:

> struct foo {
>        int a;
>        int b;
> };
>
> const foo f = { .a = 10, .b = 11 };
>

clang trunk issues an error;

[~]> clang test.c
test.c:6:7: error: must use 'struct' tag to refer to type 'foo'
const foo f = { .a = 10, .b = 11 };
      ^
      struct
1 error generated.

Regards,
ismail
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110116/63c61896/attachment.html>


More information about the cfe-dev mailing list