rmaprath marked an inline comment as done. ================ Comment at: src/cxa_aux_runtime.cpp:19-25 @@ -18,5 +18,9 @@ extern "C" { _LIBCXXABI_FUNC_VIS LIBCXXABI_NORETURN void __cxa_bad_cast(void) { +#ifndef _LIBCXXABI_NO_EXCEPTIONS throw std::bad_cast(); +#else + std::terminate(); +#endif } ---------------- rmaprath wrote: > I'm not very familiar with how RTTI works, I was simply getting rid of the > `throw` statements which get in the way of compiling with `-fno-exceptions`. > > So, I presume these `__cxa_bad_xxx` calls are inserted by the compiler? > > The tests `dynamic_cast_xxx` all seem to pass, which I found a bit weird > because I would've expected some of those to fail because of the > `std::terminate()`. Or are they not related to RTTI? Thanks. I will try to get clang to generate these (btw, do you have a reference for those RTTI functions? I couldn't find much on the interwebs.
I suppose leaving these functions (which call `std::terminate()`) in the -fno-exceptions variant is not a problem? http://reviews.llvm.org/D20677 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits