Zero Length Arrays Allowed in C Standard?

Ron Baalke baalke at mars.jpl.nasa.gov
Fri Dec 1 06:01:00 AEST 1989


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?

 Ron Baalke                       |    baalke at mars.jpl.nasa.gov 
 Jet Propulsion Lab  M/S 301-355  |    baalke at jems.jpl.nasa.gov 
 4800 Oak Grove Dr.               |
 Pasadena, CA 91109               |



More information about the Comp.lang.c mailing list