Alignment issue on x86_64?

Bob Plantz plantz@cds1.net
Mon Jun 23 19:58:00 GMT 2008


> >  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.

Bob




More information about the Gcc-help mailing list