This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]