Re: sizeof struct { short x } on arm gcc-3.2.1

2007-02-16 Thread Rutger Hofman
Paul Brook wrote: My (embedded) development system is gcc-3.2.1 arm-elf. I don't really understand its value for sizeof(struct { short x }). sizeof s_sh 4 sizeof short 2 This is a feature of the ARM ABI you are using. All structures are word aligned (which implies being word sized). Paul

sizeof struct { short x } on arm gcc-3.2.1

2007-02-16 Thread Rutger Hofman
o do with alignment, but even then I don't really understand. To create an array of such structs, no padding seems required. Or has this already been fixed in not so ancient versions of arm-elf-gcc? Thanks for enlightening me, Rutger Hofman VU Amsterdam