This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Zero-length arrays
- To: torvalds at transmeta dot com (Linus Torvalds)
- Subject: Re: Zero-length arrays
- From: Tim Hollebeek <tim at hollebeek dot com>
- Date: Thu, 4 Jan 2001 14:25:06 -0500 (EST)
- Cc: dkorn at pixelpower dot com, gcc at gcc dot gnu dot org
Linus Torvalds writes ...
>
> In article <718D38CAB6E0D011B2C90060970C28A5642562@EXCHANGESERVER> you write:
> >
> >> Aren't they only allowed at the *end* of structs ?
> >>
> >>That's what the documentation implies (though it's less clear that it
> >>could be) but there's no code to check for it.
> >>
> >>Note that zero-length arrays should be allowed anywhere, but everywhere but
> >>the end they really *are* zero length and aren't extendable.
> >
> > I can't see the point in a genuine 0-length array ?
>
> Actually, they do occur quite naturally in certain circumstances.
If you had followed the entire thread, you would have noticed that
"genuine" in this context means "0-length arrays other than the kind
you posted about".