Alignment issue on x86_64?

NightStrike nightstrike@gmail.com
Tue Jun 24 15:34:00 GMT 2008


On Mon, Jun 23, 2008 at 3:43 PM, Bob Plantz <plantz@cds1.net> wrote:
>
>> >  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.
>
> I may have missed something in the discussion, but be aware that longs
> in x86 are 32-bit, but in x86_64 they are 64-bit.

*on most architectures

:)



More information about the Gcc-help mailing list