This is the mail archive of the gcc-help@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: Problem with -O3 and int to pointer (64bits)


Benjamin Grange wrote:
On 11/3/06, Andrew Haley <aph@redhat.com> wrote:
This is a bug in your code.

Do you see a problem in this line?:
(void *)  (unsigned long)(*(((unsigned int *)&a)));

It's not C++. I guess you intend to avoid platforms where there is a size problem with this conversion. On other platforms, for it to have a chance of working, you would have to set -fno-strict-aliasing.



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