Newsgroups: comp.lang.c Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: Union type conversions Message-ID: <1988Jul23.220609.22105@utzoo.uucp> Organization: U of Toronto Zoology References: <5754@bloom-beacon.MIT.EDU> <1180@mcgill-vision.UUCP> <3717@ece-csc.UUCP> <12628@mimsy.UUCP> Date: Sat, 23 Jul 88 22:06:09 GMT In article <12628@mimsy.UUCP> chris@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