Path: utzoo!attcan!uunet!samsung!zaphod.mps.ohio-state.edu!unix.cis.pitt.edu!kenmoore From: kenmoore@unix.cis.pitt.edu (Kenneth L Moore) Newsgroups: comp.lang.c Subject: Re: Zero Length Arrays Allowed in C Standard? Message-ID: <20996@unix.cis.pitt.edu> Date: 4 Dec 89 00:34:26 GMT References: <2298@jato.Jpl.Nasa.Gov> Reply-To: kenmoore@unix.cis.pitt.edu (Kenneth L Moore) Organization: Univ. of Pittsburgh, Comp & Info Services 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? ==> ==> 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 | If you want to find out if your C code is conservative, run lint on it. You are much more likely to get transportable code if you do this. Ken