[Bug c++/60685] exception not caught by enclosing catch
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Mar 27 15:03:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60685
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-03-27
Ever confirmed|0 |1
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Reduced to a single file:
struct B {
B() { throw 1; }
};
B f() { return B(); }
struct S {
B b = f();
};
int main()
{
try {
S s;
} catch(int) {
}
}
In __cxa_throw we return from _Unwind_RaiseException and run:
82 // Some sort of unwinding error. Note that terminate is a handler.
83 __cxa_begin_catch (&header->exc.unwindHeader);
84 std::terminate ();
85 }
More information about the Gcc-bugs
mailing list