From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4A96C3858C52; Wed, 28 Dec 2022 09:50:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4A96C3858C52 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1672221028; bh=ISMmrkVkHtOLHtdhCabcH5J66GZ2RkDzSx2biY1L9pA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=mA9lcd5fikruZEZ3BXoiNs8f521wXapDxrOp5MnWWPffGQD10oNWiN0sLMdmg6z/s Na0WkqDH2BoV2urejfSuM4ox+CTPWTFWl/WnttlN8e4wpDLH96rVa0jQrrvM5po+iJ asls6k3vjygmnyMed7KuPEayTNB4AxJ7OvkC3LOg= From: "alvinhochun at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/64384] mingw-w64: stdcall function returning an aggregate is incompatible with MS ABI Date: Wed, 28 Dec 2022 09:50:25 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 4.9.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: alvinhochun at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D64384 Alvin Wong changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |alvinhochun at gmail dot c= om --- Comment #8 from Alvin Wong --- According to https://devblogs.microsoft.com/oldnewthing/20220113-00/?p=3D10= 6152, 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=3D54226 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 memb= er functions are wrong.=