This is the mail archive of the
mailing list for the GCC project.
Re: What does zero-length array mean at file scope?
On Sun, 24 May 2009, Andrew Haley wrote:
> Of course we have to fix the assembler output. For ant two declarations
> a and b, &a != &b, even when a is a zero-length array. So, you have to
> allocate at least one byte.
I don't think this is necessarily part of the semantics for the GNU
extensions of zero-length arrays and empty structures. Certainly when
they are used in the middle of a structure they are not expected to take
up any space (so their address may be the same as that of the next
Joseph S. Myers