Union type conversions
Henry Spencer
henry at utzoo.uucp
Sun Jul 24 08:06:09 AEST 1988
In article <12628 at mimsy.UUCP> chris at mimsy.UUCP (Chris Torek) writes:
>Write some correct code that produces a wrong answer if a union of a
>set of elements were implemented as a structure containing all the
>elements, and you will have a proof...
Easy, given (3.5.2.1): "A pointer to a union object, suitably cast,
points to each of its members... and vice versa." If two members have
the same type, they have to be in the same place.
--
Anyone who buys Wisconsin cheese is| Henry Spencer at U of Toronto Zoology
a traitor to mankind. --Pournelle |uunet!mnetor!utzoo! henry @zoo.toronto.edu
More information about the Comp.lang.c
mailing list