Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!ico!ism780c!news From: news@ism780c.isc.com (News system) Newsgroups: comp.lang.c Subject: Re: Zero Length Arrays Allowed in C Standard? Message-ID: <37140@ism780c.isc.com> Date: 1 Dec 89 22:43:32 GMT References: <2298@jato.Jpl.Nasa.Gov> Reply-To: marv@ism780.UUCP (Marvin Rubenstein) Organization: Interactive Systems Corp., Santa Monica CA Lines: 19 In article <2298@jato.Jpl.Nasa.Gov> baalke@mars.jpl.nasa.gov (Ron Baalke) writes: : :I've inherited some C code that had the following declaration in it: : : char tbi[0]; : :When I tried to compile this using Turbo C v2.0 or VAX C, it was flagged as :a fatal error. My question is this: are zero length arrays allowed in the :ANSI standard for C? No. Here is the quote from the standard of Dec 7, 1988 (page 68, line 3): The expression delimited by [ and ] (which specifies the size of the of an array) shall be an integral constant expression that has a value greater than zero. I believe this one of the hot issues debated by the committee. Marv Rubinstein