🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #1035

Zero Length Arrays Allowed?

#1035
From: Ron Baalke
Date: Thu, 30 Nov 1989 19:03
13 lines
939 bytes
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 and VAX C, it was flagged as
a fatal error. My question is this: are zero length arrays allowed in the
ANSI standard for C?

 Ron Baalke                       |    baalke@mars.jpl.nasa.gov 
 Jet Propulsion Lab  M/S 301-355  |    baalke@jems.jpl.nasa.gov 
 4800 Oak Grove Dr.               |
 Pasadena, CA 91109               |
Technical Details
Message-ID: <2299@jato.Jpl.Nasa.Gov>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!henry.jpl.nasa.gov!elroy.jpl.nasa.gov!jato!mars.jpl.nasa.gov!baalke

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!henry.jpl.nasa.gov!elroy.jpl.nasa.gov!jato!mars.jpl.nasa.gov!baalke
From: baalke@mars.jpl.nasa.gov (Ron Baalke)
Newsgroups: comp.std.c
Subject: Zero Length Arrays Allowed?
Message-ID: <2299@jato.Jpl.Nasa.Gov>
Date: 30 Nov 89 19:03:21 GMT
Sender: news@jato.Jpl.Nasa.Gov
Reply-To: baalke@mars.jpl.nasa.gov (Ron Baalke)
Organization: Jet Propulsion Laboratory, Pasadena, CA.
Lines: 13