summaryrefslogtreecommitdiff
path: root/src/cxa_aux_runtime.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cxa_aux_runtime.cpp')
-rw-r--r--src/cxa_aux_runtime.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/cxa_aux_runtime.cpp b/src/cxa_aux_runtime.cpp
index a455fad..bb7c9f1 100644
--- a/src/cxa_aux_runtime.cpp
+++ b/src/cxa_aux_runtime.cpp
@@ -17,16 +17,28 @@
namespace __cxxabiv1 {
extern "C" {
_LIBCXXABI_FUNC_VIS LIBCXXABI_NORETURN void __cxa_bad_cast(void) {
+#ifndef _LIBCXXABI_NO_EXCEPTIONS
throw std::bad_cast();
+#else
+ std::terminate();
+#endif
}
_LIBCXXABI_FUNC_VIS LIBCXXABI_NORETURN void __cxa_bad_typeid(void) {
+#ifndef _LIBCXXABI_NO_EXCEPTIONS
throw std::bad_typeid();
+#else
+ std::terminate();
+#endif
}
_LIBCXXABI_FUNC_VIS LIBCXXABI_NORETURN void
__cxa_throw_bad_array_new_length(void) {
+#ifndef _LIBCXXABI_NO_EXCEPTIONS
throw std::bad_array_new_length();
+#else
+ std::terminate();
+#endif
}
} // extern "C"
} // abi