From owner-freebsd-hackers Mon Mar 4 12:36: 1 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 3C11837B400 for ; Mon, 4 Mar 2002 12:35:59 -0800 (PST) Received: (from lowell@localhost) by be-well.ilk.org (8.11.6/8.11.4) id g24KZwq02583; Mon, 4 Mar 2002 15:35:58 -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: <20020304174200.X74223-100000@beagle.fokus.gmd.de> From: Lowell Gilbert Date: 04 Mar 2002 15:35:58 -0500 In-Reply-To: <20020304174200.X74223-100000@beagle.fokus.gmd.de> Message-ID: <44henw2hqp.fsf@lowellg.ne.mediaone.net> Lines: 21 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 Harti Brandt writes: > This should be > > struct foo { > char array[]; > }; > > according to C-99, on which gcc2 barfs. Don't know, whether gcc3 can > handle this. C-99 requires a fully specified type before the unspecified array (and requires said array to be the last element in the structure). So this example is *not* valid in C99, but the following would be: struct foo { int bar; char array[]; }; [Which makes sense; it forces a structure to have a non-zero size.] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message