I don't have a working example but I read this while googling:
Quote:
This was used before C99 as well, but it was then undefined behavior, known as the "struct hack" referred to in another answer. Before C90, there could be unexpected padding bytes at the end of the struct, leading to bugs.
and
Quote:
Yes, it is impossible to use a VLA in a structure. The size of a structure has to be known at compile time. FAMs are not counted in the size of the structure, though they may affect the amount of padding in the structure.
This makes sense if the structure with an array of [0] includes any member preceding it. It should work regardless (although still undefined) if the static array is the only element of the structure. This seems to be one of the possible sources of bugs when writing in C due to the use of undefined behavior, addressed by using [1] or [] (C99) instead.