aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.6/libstdc++-v3/libsupc++/eh_call.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.6/libstdc++-v3/libsupc++/eh_call.cc')
-rw-r--r--gcc-4.6/libstdc++-v3/libsupc++/eh_call.cc16
1 files changed, 10 insertions, 6 deletions
diff --git a/gcc-4.6/libstdc++-v3/libsupc++/eh_call.cc b/gcc-4.6/libstdc++-v3/libsupc++/eh_call.cc
index f519f35f0..f8f403f57 100644
--- a/gcc-4.6/libstdc++-v3/libsupc++/eh_call.cc
+++ b/gcc-4.6/libstdc++-v3/libsupc++/eh_call.cc
@@ -105,14 +105,14 @@ __cxa_call_unexpected(void* exc_obj_in)
} end_catch_protect_obj;
- __try
- {
+ __try
+ {
if (foreign_exception)
std::unexpected();
else
__unexpected(unexpectedHandler);
}
- __catch(...)
+ __catch(...)
{
/* See if the new exception matches the rtti list. */
if (foreign_exception)
@@ -141,15 +141,19 @@ __cxa_call_unexpected(void* exc_obj_in)
&new_ptr) != ctm_failed)
__throw_exception_again;
- if (catch_type->__do_catch(&bad_exc, 0, 1))
+ // If the exception spec allows std::bad_exception, throw that.
+ // We don't have a thrown object to compare against, but since
+ // bad_exception doesn't have virtual bases, that's OK; just pass NULL.
+ void* obj = NULL;
+ if (catch_type->__do_catch(&bad_exc, &obj, 1))
bad_exception_allowed = true;
}
// If the exception spec allows std::bad_exception, throw that.
-#ifdef __EXCEPTIONS
+#ifdef __EXCEPTIONS
if (bad_exception_allowed)
throw std::bad_exception();
-#endif
+#endif
// Otherwise, die.
__terminate(terminateHandler);