[Bug c++/32016] sizeof(class) always a multiple of 4 on 32 bit machine
pbrook at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon May 21 22:56:00 GMT 2007
------- Comment #7 from pbrook at gcc dot gnu dot org 2007-05-21 23:55 -------
On arm-elf structures are padded/aligned to a 4-byte boundary. This is a
"feature" of the ABI. The microsoft compiler obviously conforms to a different
ABI, which is why you get different results. Both are "correct".
Any code that relies on a particular structure layout or size is inherently
unportable.
EABI based targets (eg. arm-eabi) use a more conventional ABI.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32016
More information about the Gcc-bugs
mailing list