Type punning in C

T. William Wells bill at twwells.com
Tue Oct 24 09:48:10 AEST 1989


In article <14939 at haddock.ima.isc.com> karl at haddock.ima.isc.com (Karl Heuer) writes:
: It may be that the undefined-behavior clause would permit an implementation
: where punning doesn't work and differently-typed union members don't overlap,
: provided that appropriate code is generated when casting to/from a union type.
: This may be the source of the rumor you heard.

Actually, the standard is quite unambiguous in asserting that the
members of a union overlap. But it doesn't say beans about by how
much.

---
Bill                    { uunet | novavax | ankh | sunvice } !twwells!bill
bill at twwells.com



More information about the Comp.lang.c mailing list