On Fri, 6 Jan 2012 09:18:58 -0500 (EST), Mouse wrote
I said "points into either T or S", not
"points into what either T or S
points to". That is, "*T = X;" may change S (as opposed to changing
the memory S points to).
Ah. The rule that permits the compiler to optimize the long form into the short
here is C89 3.3.16.1:
If the value being stored in an object is accessed from another
object that overlaps in any way the storage of the first object,
then the overlap shall be exact and the two objects shall have
qualified or unqualified versions of a compatible type; otherwise
the behavior is undefined.
(C11 changes 'accessed' to 'read'.)
--
Kevin Schoedel <schoedel at kw.igs.net> VA3TCS