From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23111 invoked by alias); 28 Nov 2013 11:18:11 -0000 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 Received: (qmail 23061 invoked by uid 48); 28 Nov 2013 11:18:08 -0000 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/33799] Return value's destructor not executed when a local variable's destructor throws Date: Thu, 28 Nov 2013 11:18:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-11/txt/msg02880.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33799 --- Comment #6 from Jonathan Wakely --- It's now 2013 so the sensible thing to do is not return by value if your destructor can throw. FWIW Clang also behaves the same as G++ and Intel, and of course calls std::terminate() in C++11 mode.