Re: Alignment issue on x86_64?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rémi Cardona wrote:
> Andrew Haley a écrit :
>> Are you using optimization?
> 
> No, I'm building with those CFLAGS : -g -ggdb -Wall -save-temps
> -fno-strict-aliasing
> 
>>  I think can see at least one bug in this function.
>>
>>       ((CARD32 *)data)[i] = ((long *)retval)[i];
> 
> You're absolutely right, CARD32 is defined as an "unsigned long" on x86
> but as an "unsigned int" on x86_64. Changing this does not however
> change anything in how the Xlib call done just before behaves.
> 
>> Try compiling with -fno-strict-aliasing.
> 
> Doesn't change anything. No additional warnings nor any change in behavior.

Then this is probably a bug in gcc.  I'd debug it a bit more
then start working on a cut-down test case.

Andrew.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux