Subject: Re: bit set/clr macro's; atomic instructions.
To: Peter Seebach <seebs@solon.com>
From: Charles M. Hannum <mycroft@mit.edu>
List: port-m68k
Date: 09/10/1996 23:44:16
Peter Seebach <seebs@solon.com> writes:

> 
> 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.

You'll note that this says nothing about where the pointer points to
in between.  I could write an implementation that complies with this,
yet flips the top bit of the address on every cast.

> 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.

I haven't found such a statement.


Anyway, this is pretty much a moot point.