Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!shadooby!samsung!usc!merlin.usc.edu!nunki.usc.edu!jeenglis From: jeenglis@nunki.usc.edu (Joe English) Newsgroups: comp.lang.c Subject: Re: Zero Length Arrays Allowed in C Standard? Message-ID: <6823@merlin.usc.edu> Date: 3 Dec 89 03:42:05 GMT References: <2298@jato.Jpl.Nasa.Gov> <11715@smoke.BRL.MIL> <480@codonics.COM> <1989Dec2.210042.12668@twwells.com> Sender: news@merlin.usc.edu Reply-To: jeenglis@nunki.usc.edu (Joe English) Organization: University of Southern California, Los Angeles, CA Lines: 31 bill@twwells.com (T. William Wells) writes: >In article <480@codonics.COM> bret@codonics.com (Bret Orsburn) writes: [ on zero-sized objects ] >: Aargh! Whatever happened to "don't break existing code"?! >: >: What was the rationale behind this (IMHO) arbitrary obstruction? > >Here we !@#$ing go again. Someone mistaking the details of their >particular implementation for legal C. > >This "arbitrary obstruction" is common practice; most of the C >compilers I've worked with do *not* support zero sized objects. So now that they're explicitly forbidden, code written for compilers that don't support them won't break. If they were supported, code written for those compilers *still* wouldn't break. (Not for that reason, anyway.) Seeing as how most compiler vendors have to make major revisions to support ANSI (or have already done so) anyway, how is this an issue? (I do see, however, that supporting zero-sized arrays would have required extensive revisions to the draft itself, and probably would have substantially increased language complexity. That sounds like a valid reason to me, though I'd like to see them supported too.) --Joe English jeenglis@nunki.usc.edu