From owner-freebsd-hackers Mon Mar 4 12:32:54 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from be-well.ilk.org (lowellg.ne.mediaone.net [24.147.188.158]) by hub.freebsd.org (Postfix) with ESMTP id 1991A37B402 for ; Mon, 4 Mar 2002 12:32:50 -0800 (PST) Received: (from lowell@localhost) by be-well.ilk.org (8.11.6/8.11.4) id g24KWmb02577; Mon, 4 Mar 2002 15:32:48 -0500 (EST) (envelope-from lowell@world.std.com) X-Authentication-Warning: be-well.ilk.org: lowell set sender to lowell@world.std.com using -f To: freebsd-hackers@freebsd.org Subject: Re: A few questions about a few includes 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> From: Lowell Gilbert Date: 04 Mar 2002 15:32:48 -0500 In-Reply-To: <20020304181117.A594@student.uu.se> Message-ID: <44lmd82hvz.fsf@lowellg.ne.mediaone.net> Lines: 38 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Erik Trulsson writes: > On Mon, Mar 04, 2002 at 09:35:29AM -0700, M. Warner Losh wrote: > > In message: <20020304104158.GB63341@student.uu.se> > > Erik Trulsson 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