This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH:[darwin] fix load of a misaligned double word
Bradley Lucier <lucier@math.purdue.edu> writes:
| Well, I disagree with your reading of the standard and with your
| reading of my code. For example, my code does not do a direct
| conversion from int * to double *, even though you imply that it does
| by stating several times that this would be invalid.
It does not matter whether that conversion is direct or whether a very
long and contrived trip.
Furthermore, the very paragraph about memory aliasing in question is:
6.5 Expressions
[...]
[#7] An object shall have its stored value accessed only by
an lvalue expression that has one of the following types:73)
-- a type compatible with the effective type of the
object,
-- a qualified version of a type compatible with the
effective type of the object,
-- a type that is the signed or unsigned type
corresponding to the effective type of the object,
-- a type that is the signed or unsigned type
corresponding to a qualified version of the effective
type of the object,
-- an aggregate or union type that includes one of the
aforementioned types among its members (including,
recursively, a member of a subaggregate or contained
union), or
-- a character type.
-- Gaby