This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/29487] Shared libstdc++ fails to link
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Feb 2007 09:06:20 -0000
- Subject: [Bug target/29487] Shared libstdc++ fails to link
- References: <bug-29487-276@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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