From 17c8c462ae668987899ef45af60b7264724c9a58 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Mon, 25 Apr 2011 10:09:29 +0900 Subject: [PATCH] exception.cpp: std::uncaught_exception() may return false with -fno-exceptions. --- src/exception.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/exception.cpp b/src/exception.cpp index 4d4caf4b..e014266c 100644 --- a/src/exception.cpp +++ b/src/exception.cpp @@ -77,6 +77,9 @@ std::terminate() bool std::uncaught_exception() throw() { +#ifdef _LIBCPP_NO_EXCEPTIONS + return false; +#endif #if __APPLE__ // on Darwin, there is a helper function so __cxa_get_globals is private return __cxxabiapple::__cxa_uncaught_exception();