This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Bootstrap broken on debian/amd64?
On Tue, Feb 01, 2005 at 08:45:20PM +0000, Joseph S. Myers wrote:
> > Except that it isn't. Array decays to pointer in a parameter context.
>
> But the constraint in C99 is on array declarators, "The element type shall
> not be an incomplete or function type.". This applies to the syntax
> whenever it describes an array type even that array type then gets
> adjusted to a pointer type. In C90, without the constraint, there was
> undefined behavior for an array of incomplete type, even in parameter
> context: DR#047 example 3 is almost exactly this case
>
> /* 3 */ struct S *g(struct S a[]) {return a; }
>
> and was said to involve undefined behavior. "However, there is nothing to
> suggest that a not-strictly-conforming array type can magically be
> transformed into a strictly conforming pointer parameter via this rule."
Huh. I stand corrected.
r~