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: Alignment issue on x86_64?


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

:)


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