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, 1 Feb 2005, Richard Henderson wrote:
> On Tue, Feb 01, 2005 at 05:12:26PM +0100, Steven Bosscher wrote:
> > > extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask)
> >
> > Yup. PR19333, which I commited a fix for last night. That code
> > really is illegal.
>
> 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."
--
Joseph S. Myers http://www.srcf.ucam.org/~jsm28/gcc/
jsm@polyomino.org.uk (personal mail)
joseph@codesourcery.com (CodeSourcery mail)
jsm28@gcc.gnu.org (Bugzilla assignments and CCs)