[Bug target/64384] mingw-w64: stdcall function returning an aggregate is incompatible with MS ABI
jay.krell at cornell dot edu
gcc-bugzilla@gcc.gnu.org
Tue Dec 4 11:48:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64384
Jay <jay.krell at cornell dot edu> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jay.krell at cornell dot edu
--- Comment #6 from Jay <jay.krell at cornell dot edu> ---
This is probably a bug in Visual C++ when compiling as C.
Or rather, whatever is/was correct, C and C++ should have matched.
At this point, one must be considered correct, the other incorrect, and neither
changable.
Since most "COM" programming is done with C++, given no good choice here, the
C++ behavior should be considered "correct", and either g++ but not gcc, or
g++ and gcc should follow it. Certainly, at least, g++ should follow Visual C++
C++ behavior.
Consider warning.
Really there is no perfect fix here.
The relatively few C programmers using COM, will have to write a little bit of
C++ to interface correctly with such rare functions.
More information about the Gcc-bugs
mailing list