This is the mail archive of the gcc-bugs@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]

[Bug c++/32016] sizeof(class) always a multiple of 4 on 32 bit machine



------- 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


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