When initializing a struct containing a struct via a variable (see
test/initializer.c, function test_struct()):
struct foo { int a; int b; } f = { 1, 2 };
struct { struct foo f; } b = { f };
8cc failed with a type error:
[ERROR] parse.c:617: (null): incompatible kind: <(struct (int) (int))>
The read_initializer_elem function did not expect an identifier as a valid
struct member initializer. This patch seems to fix that (make fulltest
passes with the above-mentioned test added).
When initializing a struct containing a struct via a variable (see test/initializer.c, function test_struct()):
8cc failed with a type error: [ERROR] parse.c:617: (null): incompatible kind: <(struct (int) (int))>
The read_initializer_elem function did not expect an identifier as a valid struct member initializer. This patch seems to fix that (make fulltest passes with the above-mentioned test added).