Originally Posted by
amadmonk
ZOMBIE! Just had to comment on this nearly year-old thread. As someone who used to work on the MSVC team, I should point out that both internal calling conventions and structure packing/layout are, technically, implementation-defined. So it's not that MSVC is "wrong" and GCC is "right" (or vice-versa). Just different.
Of course, this implementation-dependent thing may have changed since FWIK C++0x has done some work to define backwards "binary compatibility" w/C, but back when we were doing the MSVC compiler (circa VS2k3... yes, I'm old), the ONLY thing that guided us in this respect was the ANSI/ISO standards (which left the implementation up to the compiler writer) and the Intel ABI, which just gave hints and a few hard-coded specifications (specifically calling conventions).
<end defensive rant for a product that I no longer work around>