sizeof different in x86 and arm.
Richard Earnshaw
rearnsha@arm.com
Thu May 24 03:50:00 GMT 2001
> Hi:
> I have a simple struct as follow
>
> struct test_align
> {
> unsigned char Name[21];
> unsigned char Version[8];
> };
>
> But on cygwin for x86,the sizeof(struct test_align) is 29;
>
> but on cygwin for arm,the sizeof(struct test_align) return 32
>
> WHY.
>
Because structures are always padded to a multiple of 4 bytes on the ARM.
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
More information about the crossgcc
mailing list