CVS gcc/tree.c: still broken for zero length arrays

Richard Henderson rth@redhat.com
Sat Nov 25 14:02:00 GMT 2000


On Thu, Nov 23, 2000 at 09:48:29PM -0500, Craig Newell wrote:
>   A simple testcase to show the current crash:
> 
> --- bug.i ------------------
> typedef union {
>         int *a;
>         int b[0];
> } u;

I'll look into it, but also note that I am seriously considering
enforcing C99's rules for flexible array members.  That means that
the field may appear in structures _only_, and then as the last
field, and then when there is at least one other member so that
the structure size is not itself zero.

Other uses don't appear to be well defined.


r~


More information about the Gcc-bugs mailing list