But it is legal to wrap true flexible arrays in a struct that has at least 1 other non-true-flexible array, including an empty anonymous struct (i.e. taking up no size).
the last member of a structure with more than one named member may have incomplete array type; such a structure (and any union containing, possibly recursively, a member that is such a structure) shall not be a member of a structure or an element of an array
Additionally, struct {} is not valid C syntax. The grammar is
This is not legal for multiple reasons.
C99 6.7.2.1p2 says
Additionally,
struct {}
is not valid C syntax. The grammar isso we need at least one
struct-declaration
to form astruct-declaration-list
. Even if this were valid syntax, 6.7.2.1p7 says