missing struct vs zero length struct?

Russ Nelson nelson at sun.soe.clarkson.edu
Tue Dec 6 05:24:48 AEST 1988


Now that I have Turbo C 2.0 and Turbo Debugger, I find that compiling
for source level debugging conflicts with a standard information
hiding scheme, leaving structures undefined.  :-(  Fortunately, Turbo C
doesn't complain about zero length structures.

What are the portability considerations of defining zero length structures?
Like this:

struct foo {
#ifdef INTERNAL
int bar, baz;
#endif
};

--
--russ (nelson at clutx [.bitnet | .clarkson.edu])
To surrender is to remain in the hands of barbarians for the rest of my life.
To fight is to leave my bones exposed in the desert waste.



More information about the Comp.lang.c mailing list