union initialization, another brick in the wall

Tim Maroney tim at cmu-cs-k.ARPA
Fri Nov 9 05:45:16 AEST 1984


In the interests of pluralism, here is another idea concerning union
initialization.  Allow assignment expressions at the external level.  The
RHS would have to be a compile-time constant, and the LHS an already
declared lvalue.  Thus, you would have:

union {
	float x;
	int y;
} foo;

foo.x = 3;

Just a thought....
-- 
Tim Maroney, Carnegie-Mellon University Computation Center
ARPA:	Tim.Maroney at CMU-CS-K
uucp:	Try sending through a gateway such as DECWRL, UCB-VAX, SEISMO,
	or HARVARD -- mailer conventions differ on syntax



More information about the Comp.lang.c mailing list