Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Mar 2001 22:08:21 +0000
From:      Richard Earnshaw <rearnsha@buzzard.freeserve.co.uk>
To:        der Mouse <mouse@Rodents.Montreal.QC.CA>
Cc:        Shankar Agarwal <shankar_agarwal@net.com>, tech-kern@netbsd.org, freebsd-hackers@FreeBSD.ORG
Subject:   Re: Question regarding the array of size 0. 
Message-ID:  <200103202208.f2KM8LZ00878@buzzard.freeserve.co.uk>
In-Reply-To: Your message of "Tue, 20 Mar 2001 14:16:57 EST." <200103201916.OAA08339@Twig.Rodents.Montreal.QC.CA> 

next in thread | previous in thread | raw e-mail | index | archive | help
> > I am getting the following array while trying to compile
> > uipc_syscalls.c file.
> 
> > /vobs/atm/netbsd/sys/sys/syscallargs.h", line 30: zero or negative subscript
> > This is because the code in syscallargs.h is defining an array of size 0.
> 
> > Can someone pls tell me if it is possible to define an array of size
> > 0.
> 
> In C, no; in gcc, yes.
> 

You can also do it in c98, provided it is the last element of a structure.

R.


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?200103202208.f2KM8LZ00878>