summaryrefslogtreecommitdiff
path: root/libstdc++-v3/libsupc++
diff options
context:
space:
mode:
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2014-12-12 15:58:49 +0000
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2014-12-12 15:58:49 +0000
commit0fcfaa33cbf333ac69cc2b01a7277e5272ff8a3d (patch)
treea9b9668f40f36dc496d6b038eeb7f0d316b8f099 /libstdc++-v3/libsupc++
parent3ccf08bc5682eb45d60d84e0274017947027f179 (diff)
downloadgcc-0fcfaa33cbf333ac69cc2b01a7277e5272ff8a3d.tar.gz
PR libstdc++/64276
* doc/doxygen/user.cfg.in: Define __cpp_exceptions and __cpp_rtti. * doc/html/manual/using_exceptions.html: Regenerate. * doc/xml/manual/using_exceptions.xml: Use SD-6 feature-testing macros, __cpp_exceptions and __cpp_rtti, instead of __EXCEPTIONS and __GXX_RTTI. * include/bits/c++config: Likewise. * include/bits/locale_classes.tcc: Likewise. * include/bits/shared_ptr.h: Likewise. * include/bits/shared_ptr_base.h: Likewise. * include/debug/formatter.h: Likewise. * include/experimental/any: Likewise. * include/ext/rope: Likewise. * include/ext/ropeimpl.h: Likewise. * include/std/functional: Likewise. * include/tr1/functional: Likewise. * include/tr1/shared_ptr.h: Likewise. * libsupc++/eh_call.cc: Likewise. * libsupc++/eh_personality.cc: Likewise. * libsupc++/exception_defines.h: Likewise. * libsupc++/exception_ptr.h: Likewise. * libsupc++/guard.cc: Likewise. * libsupc++/pbase_type_info.cc: Likewise. * libsupc++/pointer_type_info.cc: Likewise. * libsupc++/vterminate.cc: Likewise. * src/c++11/thread.cc: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218679 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/libsupc++')
-rw-r--r--libstdc++-v3/libsupc++/eh_call.cc2
-rw-r--r--libstdc++-v3/libsupc++/eh_personality.cc4
-rw-r--r--libstdc++-v3/libsupc++/exception_defines.h2
-rw-r--r--libstdc++-v3/libsupc++/exception_ptr.h2
-rw-r--r--libstdc++-v3/libsupc++/guard.cc2
-rw-r--r--libstdc++-v3/libsupc++/pbase_type_info.cc2
-rw-r--r--libstdc++-v3/libsupc++/pointer_type_info.cc2
-rw-r--r--libstdc++-v3/libsupc++/vterminate.cc2
8 files changed, 9 insertions, 9 deletions
diff --git a/libstdc++-v3/libsupc++/eh_call.cc b/libstdc++-v3/libsupc++/eh_call.cc
index 76776927aee..d204ddb49c8 100644
--- a/libstdc++-v3/libsupc++/eh_call.cc
+++ b/libstdc++-v3/libsupc++/eh_call.cc
@@ -149,7 +149,7 @@ __cxa_call_unexpected(void* exc_obj_in)
}
// If the exception spec allows std::bad_exception, throw that.
-#ifdef __EXCEPTIONS
+#if __cpp_exceptions
if (bad_exception_allowed)
throw std::bad_exception();
#endif
diff --git a/libstdc++-v3/libsupc++/eh_personality.cc b/libstdc++-v3/libsupc++/eh_personality.cc
index cb4467aa032..915f9ae189b 100644
--- a/libstdc++-v3/libsupc++/eh_personality.cc
+++ b/libstdc++-v3/libsupc++/eh_personality.cc
@@ -551,7 +551,7 @@ PERSONALITY_FUNCTION (int version,
else if (!foreign_exception)
thrown_ptr = __get_object_from_ue (ue_header);
#else
-#ifdef __GXX_RTTI
+#if __cpp_rtti
// During forced unwinding, match a magic exception type.
if (actions & _UA_FORCE_UNWIND)
{
@@ -777,7 +777,7 @@ __cxa_call_unexpected (void *exc_obj_in)
// 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 0.
-#if defined(__EXCEPTIONS) && defined(__GXX_RTTI)
+#if __cpp_exceptions && __cpp_rtti
const std::type_info &bad_exc = typeid (std::bad_exception);
if (check_exception_spec (&info, &bad_exc, 0, xh_switch_value))
throw std::bad_exception();
diff --git a/libstdc++-v3/libsupc++/exception_defines.h b/libstdc++-v3/libsupc++/exception_defines.h
index 89ea52af5bb..768c14296e9 100644
--- a/libstdc++-v3/libsupc++/exception_defines.h
+++ b/libstdc++-v3/libsupc++/exception_defines.h
@@ -30,7 +30,7 @@
#ifndef _EXCEPTION_DEFINES_H
#define _EXCEPTION_DEFINES_H 1
-#ifndef __EXCEPTIONS
+#if ! __cpp_exceptions
// Iff -fno-exceptions, transform error handling code to work without it.
# define __try if (true)
# define __catch(X) if (false)
diff --git a/libstdc++-v3/libsupc++/exception_ptr.h b/libstdc++-v3/libsupc++/exception_ptr.h
index 8b27359357f..7775278d52b 100644
--- a/libstdc++-v3/libsupc++/exception_ptr.h
+++ b/libstdc++-v3/libsupc++/exception_ptr.h
@@ -168,7 +168,7 @@ namespace std
exception_ptr
make_exception_ptr(_Ex __ex) _GLIBCXX_USE_NOEXCEPT
{
-#ifdef __EXCEPTIONS
+#if __cpp_exceptions
try
{
throw __ex;
diff --git a/libstdc++-v3/libsupc++/guard.cc b/libstdc++-v3/libsupc++/guard.cc
index 54f745876d4..3f9c7a6a193 100644
--- a/libstdc++-v3/libsupc++/guard.cc
+++ b/libstdc++-v3/libsupc++/guard.cc
@@ -203,7 +203,7 @@ namespace __cxxabiv1
static inline void
throw_recursive_init_exception()
{
-#ifdef __EXCEPTIONS
+#if __cpp_exceptions
throw __gnu_cxx::recursive_init_error();
#else
// Use __builtin_trap so we don't require abort().
diff --git a/libstdc++-v3/libsupc++/pbase_type_info.cc b/libstdc++-v3/libsupc++/pbase_type_info.cc
index 8b9cdef55fa..4bd8b9f5280 100644
--- a/libstdc++-v3/libsupc++/pbase_type_info.cc
+++ b/libstdc++-v3/libsupc++/pbase_type_info.cc
@@ -37,7 +37,7 @@ __do_catch (const type_info *thr_type,
if (*this == *thr_type)
return true; // same type
-#ifdef __GXX_RTTI
+#if __cpp_rtti
if (typeid (*this) != typeid (*thr_type))
return false; // not both same kind of pointers
#endif
diff --git a/libstdc++-v3/libsupc++/pointer_type_info.cc b/libstdc++-v3/libsupc++/pointer_type_info.cc
index bee8072cf85..61cff0c8640 100644
--- a/libstdc++-v3/libsupc++/pointer_type_info.cc
+++ b/libstdc++-v3/libsupc++/pointer_type_info.cc
@@ -40,7 +40,7 @@ __pointer_catch (const __pbase_type_info *thrown_type,
void **thr_obj,
unsigned outer) const
{
-#ifdef __GXX_RTTI
+#if __cpp_rtti
if (outer < 2 && *__pointee == typeid (void))
{
// conversion to void
diff --git a/libstdc++-v3/libsupc++/vterminate.cc b/libstdc++-v3/libsupc++/vterminate.cc
index 1935479850c..7a4c49bce25 100644
--- a/libstdc++-v3/libsupc++/vterminate.cc
+++ b/libstdc++-v3/libsupc++/vterminate.cc
@@ -78,7 +78,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// If the exception is derived from std::exception, we can
// give more information.
__try { __throw_exception_again; }
-#ifdef __EXCEPTIONS
+#if __cpp_exceptions
__catch(const exception& exc)
{
char const *w = exc.what();