------- Comment #7 from mattias at virtutech dot se  2009-03-20 17:16 -------
The proposed patch works for plain C code, but also affects C++. Since
libstdc++ contains code that returns aggregates or calls code that does,
-mms-aggregate-return will make the generated code incompatible with the C++
library. This makes it impossible to write C++ code that links (as a DLL) to
code compiled with Microsoft or Intel compilers, even if the interface is in
plain C.

We are exactly in this situation. We will have to build libstdc++ with
-mms-aggregate-return, but that option would then become mandatory for all C++
code. Things would be easier if the option were on by default - we can do this
for our build locally, of course, but we'd rather not diverge too much from the
standard behaviour.

An alternative would be to make the option only affect C (including extern "C"
in C++), as other languages are not subject to compatibility with MS compilers.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36834

Reply via email to