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

2007-02-16 Thread Mike Stump
On Feb 16, 2007, at 8:57 AM, Rutger Hofman wrote: If I declare the struct 'packed', then it is size 2. That is enough for my purposes. I hope that won't greatly change through versions... Also, there is: @item [EMAIL PROTECTED] @opindex mstructure-size-boundary The size of all structures and

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

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

2007-02-16 Thread Paul Brook
> 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