From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7717 invoked by alias); 15 Jul 2008 09:28:05 -0000 Received: (qmail 6357 invoked by uid 48); 15 Jul 2008 09:27:22 -0000 Date: Tue, 15 Jul 2008 09:28:00 -0000 Subject: [Bug target/36834] New: structure return ABI for windows targets differs from nbative MSVC X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "dannysmith at users dot sourceforge dot net" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-07/txt/msg01273.txt.bz2 Like i386-netware, the native MS Windows compiler assumes that the CALLER pops the stack for the implicit arguments pointing to aggregate return value. This differs from the default i386 ABI which assumes the CALLEE pops the stack. This is documented at http://www.angelcode.com/dev/callconv/callconv.html in the section on __cdecl calling convention. The bug was reported to mingw users list by Magnus Christensson at: http://www.nabble.com/Problem-returning-C-struct-from-MinGW-to-MSVC-td18444899.html This report contains a testcase demostrating the problem. Danny -- Summary: structure return ABI for windows targets differs from nbative MSVC Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: dannysmith at users dot sourceforge dot net GCC build triplet: i686-pc-mingw32 GCC host triplet: i686-pc-mingw32 GCC target triplet: i686-pc-mingw32 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36834