Subject: Re: bit set/clr macro's; atomic instructions.
To: None <mycroft@mit.edu, seebs@solon.com>
From: Peter Seebach <seebs@solon.com>
List: port-m68k
Date: 09/10/1996 21:27:40
The two relevant references:
6.3.2.3 "Structure and union members" says that the effects of referring to
one member of a union after writing to a different member are implementation
defined.

6.3.4 "Cast operators" specifies that an object of pointer or incomplete
type may be converted to a pointer to a different type, and that it is
guaranteed that this conversion can be made (and reversed, yielding
the original pointer) if the new type has no stricter alignment requirements,
and that the character type has the least strict requirement.

Somewhere in there, and I can't find it, there is a guarantee that you
can access any object whatsoever as a sequence of character type objects,
and that copying it to an array of characters and back is safe, etc etc.

This is *NOT* safe unless you are converting something to a sequence of
character types.  (signed, unsigned, or plain char.)

-s