[Bug c++/92968] New: C style struct initialization fail to compile in g++ when initializing array fields
mytbk920423 at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Dec 17 06:27:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92968
Bug ID: 92968
Summary: C style struct initialization fail to compile in g++
when initializing array fields
Product: gcc
Version: 9.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: mytbk920423 at gmail dot com
Target Milestone: ---
The following program cannot be compiled with g++ but can be compiled with
clang++ or any C compiler including gcc.
typedef struct AStruct
{
int a[2];
} AStruct;
int main()
{
AStruct t0 = { .a[0] = 5 };
}
More information about the Gcc-bugs
mailing list