Zero Length Arrays Allowed in C Standard?

T. William Wells bill at twwells.com
Sun Dec 3 08:00:42 AEST 1989


In article <480 at codonics.COM> bret at codonics.com (Bret Orsburn) writes:
: >No; Standard C does not support 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.

I like the idea but life is that it is not portable.

That ANSI chose not to require it is unfortunate but does not
change anything for those of us who believe that programs should
be portable.

---
Bill                    { uunet | novavax | ankh | sunvice } !twwells!bill
bill at twwells.com



More information about the Comp.lang.c mailing list