Date: 04 Mar 2002 15:32:48 -0500 From: Lowell Gilbert <lowell@world.std.com> To: freebsd-hackers@freebsd.org Subject: Re: A few questions about a few includes Message-ID: <44lmd82hvz.fsf@lowellg.ne.mediaone.net> In-Reply-To: <20020304181117.A594@student.uu.se> References: <20020303180029.GA56041@student.uu.se> <20020304102750.O74223-100000@beagle.fokus.gmd.de> <20020304104158.GB63341@student.uu.se> <20020304.093529.35706437.imp@village.org> <20020304181117.A594@student.uu.se>
next in thread | previous in thread | raw e-mail | index | archive | help
Erik Trulsson <ertr1013@student.uu.se> writes:
> On Mon, Mar 04, 2002 at 09:35:29AM -0700, M. Warner Losh wrote:
> > In message: <20020304104158.GB63341@student.uu.se>
> > Erik Trulsson <ertr1013@student.uu.se> writes:
> > : I think it is still there (and my draft copy says the same thing).
> > : I was thinking about the original C89 standard which does not allow it
> > : (and does not allow incomplete array types in structs). Guess I should
> > : have said which standard I was referring to.
> >
> > struct foo {
> > char array[0];
> > };
> >
> > appears to be in C-99 but not C-89. If you have the draft, so far the
> > only thing I've noticed that is different between the draft and the
> > final standard is that there's 10-15 more footnotes in the final
> > standard than were in the final draft.
> >
> > Warner
>
> Are you sure that is in C99?
> What is allowed in C99 (but wasn't in C89) is
>
> struct foo
> {
> int b;
> char array[];
> };
>
> Note that you must have a 'normal' field before the incomplete array.
>
> I don't think
> char array[0];
> is allowed in either of C89 or C99.
Correct on all counts. I'll cite the letter of the law from C99 if
anybody really cares.
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44lmd82hvz.fsf>
