From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11411 invoked by alias); 21 Mar 2009 21:49:19 -0000 Received: (qmail 11374 invoked by uid 48); 21 Mar 2009 21:49:09 -0000 Date: Sat, 21 Mar 2009 21:49:00 -0000 Message-ID: <20090321214909.11373.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/36834] structure return ABI for windows targets differs from native MSVC In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "mattias at virtutech dot se" 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: 2009-03/txt/msg01510.txt.bz2 ------- Comment #10 from mattias at virtutech dot se 2009-03-21 21:49 ------- Note that C++ objects need not be larger than 8 bytes to qualify for returning on the stack (and thus subject to this cleanup problem). Any class with a copy constructor, for example, seems to be affected. Try compiling: struct A { A(); A(const A&); int x; }; A f() { return A(); } This is probably why methods returning string::reverse_iterator make the list. (http://www.agner.org/optimize/calling_conventions.pdf was useful for understanding this.) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36834