possible structure layout bug

Stephen Kennedy Stephen.Kennedy@havok.com
Thu Jun 24 16:58:00 GMT 2004


Is there any particular reason that the packing rules for have been
changed from gcc-3.4 to gcc-3.5?

I would have thought that this would break the ABI. Unless it is fixing
existing breakage of course.

%g++-3.3 a.cpp &&  a.out
__m128 size 16, align 16
Quad   size 16, align 16
Base1 32 Derived1 32 Offset 20
Base2 32 Derived2 32 Offset 20

%g++-3.5.0-20040613 a.cpp &&  a.out
__m128 size 16, align 16
Quad   size 16, align 16
Base1 32 Derived1 32 Offset 20
Base2 32 Derived2 48 Offset 32

Attached test case for the above output.
Stephen.
-- 
Stephen Kennedy stephen.kennedy@havok.com http://www.havok.com/ 
Game Developer Frontline Award Winner 2002 & 2003
Computer Graphics World 2003 Innovation Award Winner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: a.cpp
Type: text/x-c++src
Size: 767 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20040624/067d0d45/attachment.bin>


More information about the Gcc mailing list