Zero Length Arrays Allowed in C Standard?
Joe English
jeenglis at nunki.usc.edu
Sun Dec 3 14:42:05 AEST 1989
bill at twwells.com (T. William Wells) writes:
>In article <480 at codonics.COM> bret at 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 at nunki.usc.edu
More information about the Comp.lang.c
mailing list