This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]