[Bug target/64384] mingw-w64: stdcall function returning an aggregate is incompatible with MS ABI
alvinhochun at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Dec 28 09:50:25 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64384
Alvin Wong <alvinhochun at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |alvinhochun at gmail dot com
--- Comment #8 from Alvin Wong <alvinhochun at gmail dot com> ---
According to https://devblogs.microsoft.com/oldnewthing/20220113-00/?p=106152,
Microsoft acknowledged that the behaviour is different between free function
and C++ member functions, and that it does cause breakage of the COM ABI
between C and C++. What they have done is to update the MIDL compiler to
generate C bindings compatible with the C++ ABI. (I filed
https://bugs.winehq.org/show_bug.cgi?id=54226 for implementing the same
function in widl.)
In this sense, the current behaviour of gcc and g++ regarding free functions
should be correct and does not need fixing. Only the ABI for C++ class member
functions are wrong.
More information about the Gcc-bugs
mailing list