initializing unions

B.J. herbison at ultra.DEC
Sat Nov 10 03:47:44 AEST 1984


> What is wrong with
> 
> 	union foo thing.member = {...};
> 
> ?  It is clear and unambiguous.

This works fine if the union is the top level.  It falls apart
if there is a union inside a struct or a union or if there are
several unions in the object.

There may be a way to get around this problem, but I can not think
of any clean way.

						B.J.
UUCP:		{decvax,allegra,ucbvax}!decwrl!rhea!ultra!herbison
ARPA:		decwrl!rhea!ultra!herbison@{Berleley,SU-Shasta}



More information about the Comp.lang.c mailing list