Skip site navigation (1)Skip section navigation (2)
Date:      20 Mar 2001 20:28:05 +0100
From:      joda@pdc.kth.se (Johan Danielsson)
To:        John Franklin <franklin@elfie.org>
Cc:        Peter Seebach <seebs@plethora.net>, tech-kern@netbsd.org, bsd hackers <freebsd-hackers@freebsd.org>
Subject:   Re: Question regarding the array of size 0.
Message-ID:  <xofd7bcutoa.fsf@blubb.pdc.kth.se>
In-Reply-To: John Franklin's message of "Tue, 20 Mar 2001 14:21:27 -0500"
References:  <3AB7A76B.2BCF5D6E@net.com> <200103201903.f2KJ3LO16883@guild.plethora.net> <20010320142127.D6167@elfie.org>

next in thread | previous in thread | raw e-mail | index | archive | help
John Franklin <franklin@elfie.org> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xofd7bcutoa.fsf>