union or type casting, which to use?
Karl Heuer
karl at ima.isc.com
Mon Dec 3 10:10:41 AEST 1990
In article <PDS.90Nov30094546 at lemming.webo.dg.com> pds at lemming.webo.dg.com (Paul D. Smith) writes:
>Bummer. Too bad ANSI couldn't come up with some more syntax for
>initializing unions ...
More precisely, it's too bad that a better syntax, such as my proposal for
labeled initializers (posted to alt.lang.cfutures not too long ago and now in
the hands of GNU) wasn't already existing practice at the time when it could
have made a difference. I think it's a much better solution than the kludge
X3J11 had to invent.
X3J11 wasn't particularly interested in making it possible to initialize
unions. They just wanted to have a rule that would make uninitialized
static-duration unions have a well-defined value.
Karl W. Z. Heuer (karl at ima.isc.com or uunet!ima!karl), The Walking Lint
More information about the Comp.lang.c
mailing list