Zero Length Arrays Allowed in C Standard?

Fred Smith fredex at cg-atla.UUCP
Tue Dec 5 03:44:55 AEST 1989


In article <1989Dec2.210042.12668 at twwells.com> bill at twwells.com (T. William Wells) writes:
>In article <480 at codonics.COM> bret at codonics.com (Bret Orsburn) writes:
>: >No; Standard C does not support zero-sized objects.
>:


Excuse me, but I must ask a stupid question. Why the !@#$ would anyone even want
to declare an array of zero size ???? Isn't that rather similar to a pointer
to the same type of object??  If so, what is wrong with declaring a pointer
rather than an empty array ??

I don't want to get flamed for this questin, but I would like an answer from one
of the gurus (Doug Gwyn, Chris Torek, Henry Spencer, etc.)!

Fred



More information about the Comp.lang.c mailing list