From owner-freebsd-hackers Tue Mar 20 11:28:17 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from blubb.pdc.kth.se (blubb.pdc.kth.se [130.237.221.147]) by hub.freebsd.org (Postfix) with ESMTP id D684437B719 for ; Tue, 20 Mar 2001 11:28:14 -0800 (PST) (envelope-from joda@pdc.kth.se) Received: from joda by blubb.pdc.kth.se with local (Exim 3.13 #1) id 14fRnZ-00019j-00; Tue, 20 Mar 2001 20:28:05 +0100 To: John Franklin Cc: Peter Seebach , tech-kern@netbsd.org, bsd hackers Subject: Re: Question regarding the array of size 0. References: <3AB7A76B.2BCF5D6E@net.com> <200103201903.f2KJ3LO16883@guild.plethora.net> <20010320142127.D6167@elfie.org> From: joda@pdc.kth.se (Johan Danielsson) Date: 20 Mar 2001 20:28:05 +0100 In-Reply-To: John Franklin's message of "Tue, 20 Mar 2001 14:21:27 -0500" Message-ID: Lines: 26 User-Agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG John Franklin writes: > > Not in C. > > Actually you can (see below). No you can't. This is from C99: 6.7.5.2 Array declarators Constraints In addition to optional type qualifiers and the keyword static, the [ and ] may delimit an expression or *. If they delimit an expression (which specifies the size of an array), the expression shall have an integer type. If the expression is a constant expression, it shall have a value greater than zero. [...] > What follows was done on a NetBSD 1.5 system. Which uses gcc. I think they use a similar example in the spec, but with an array size of one. /Johan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message