https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64185
--- Comment #4 from zaz at ua7 dot net ---
> > this:
> > struct PascalString
> > {
> > int length;
> > char data[0];
> > };
> > And then just allocate necessary memory block and able access to something
> > like:
> > ps.data[100] - if allocated block have enough size.
>
> This structure will always work. It is only the case where the array field
> is not at the end of the structure which is where it is undefined.
So why it not work in this case:
struct PascalString
{
int length;
char data[0];
char the_padding[1024];
};