This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: sizeof struct { short x } on arm gcc-3.2.1
- From: Paul Brook <paul at codesourcery dot com>
- To: gcc at gcc dot gnu dot org
- Cc: Rutger Hofman <rutger at cs dot vu dot nl>
- Date: Fri, 16 Feb 2007 16:46:17 +0000
- Subject: Re: sizeof struct { short x } on arm gcc-3.2.1
- References: <45D5C950.10107@cs.vu.nl>
> 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