[Bug c++/55227] designated initializer for char array by string constant
jr at heisey dot org
gcc-bugzilla@gcc.gnu.org
Wed Nov 14 18:22:00 GMT 2018
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.
More information about the Gcc-bugs
mailing list