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
- From: Bradley Lucier <lucier at math dot purdue dot edu>
- To: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- Cc: Bradley Lucier <lucier at math dot purdue dot edu>, Andrew Haley <aph at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 31 Dec 2003 18:50:25 -0500
- Subject: Re: PATCH:[darwin] fix load of a misaligned double word
Gaby:
Thank you for your note.
Item #6 in the same section says
The effective type of an object for an access to its stored value is
the declared type of the object, if any.72) If a value is stored into
an object having no declared type through an lvalue having a type that
is not a character type, then the type of the lvalue becomes the
effective type of the object for that access and for subsequent
accesses that do not modify the stored value. ...
and footnote 72 says
72) Allocated objects have no declared type.
In my case, the object in memory is a correctly aligned double
allocated via malloc; it is accessed only as a double by dereferencing
a double pointer. It is never accessed by dereferencing an integer
pointer, for example.
This seems to fit the first item in the list of #7. If I have this
wrong, please enlighten me.
Thanks again.
Brad