From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30847 invoked by alias); 5 Feb 2007 09:06:35 -0000 Received: (qmail 30788 invoked by uid 48); 5 Feb 2007 09:06:20 -0000 Date: Mon, 05 Feb 2007 09:06:00 -0000 Message-ID: <20070205090620.30787.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/29487] Shared libstdc++ fails to link In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenth at gcc dot gnu dot org" 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: 2007-02/txt/msg00685.txt.bz2 ------- Comment #20 from rguenth at gcc dot gnu dot org 2007-02-05 09:06 ------- What we want to prevent with the patch for PR29323 is the TREE_NOTHROW flag propagating to a locally binding function. Consider void foo() nothrow __attribute__((weak)) {} void bar() { foo(); } we need EH unwind data emitted for bar() even if foo() is marked or analyzed as nothrow as at run time bar() might call a foo() that throws. At least if using C and -fexceptions this is a valid use (we of course can declare this invalid for C++, but this can be a runtime error only which will then be hard to diagnose). I'm in no way expert enough to say if we can omit EH data for foo() in the above case (we probably can), but if so then splitting the TREE_NOTHROW flag into two is probably the right thing to go. I suppose PR29323 was found by inspection of GCC code rather than a real-world testcase so the option to revert that patch on the 4.1 branch looks appealing. (CCed Joern to clarify) -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |amylaar at gcc dot gnu dot | |org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29487