This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/55227] designated initializer for char array by string constant


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55227

J.R. Heisey <jr at heisey dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jr at heisey dot org

--- Comment #3 from J.R. Heisey <jr at heisey dot org> ---
struct S s1 = { { a : "aaaa" } };
struct S s2 = { { .a = "aaaa"} };

This compiles with 6.2.1 for ARM by Linaro.
You need separate braces around the array initializer to distinguish it from
the struct initializer.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]