diff options
| author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-11-07 13:20:33 +0000 |
|---|---|---|
| committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-11-07 13:20:33 +0000 |
| commit | 1590c7d45349b3e5bb4449c740c83172f490ee74 (patch) | |
| tree | 5e8df8f8120799af6eda74296cbb619955ece69b /libstdc++-v3/include/ext | |
| parent | 7b41dbcfc942727a9155c632d58fa608101b042f (diff) | |
| download | ppe42-gcc-1590c7d45349b3e5bb4449c740c83172f490ee74.tar.gz ppe42-gcc-1590c7d45349b3e5bb4449c740c83172f490ee74.zip | |
2012-11-07 Paolo Carlini <paolo.carlini@oracle.com>
* include/debug/array (_GLIBCXX_THROW_OR_ABORT): Move...
* include/bits/c++config: ... here.
* include/bits/shared_ptr_base.h (__throw_bad_weak_ptr): Use it.
* include/ext/pb_ds/exception.hpp: Likewise.
* include/ext/throw_allocator.h (__throw_forced_error): Likewise.
* include/ext/concurrence.h (__throw_concurrence_lock_error,
__throw_concurrence_unlock_error, __throw_concurrence_broadcast_error,
__throw_concurrence_wait_error): Likewise.
* include/tr1/shared_ptr.h (__throw_bad_weak_ptr): Likewise.
* include/tr1/functional (function<_Res(_ArgTypes...)>::operator()
(_ArgTypes...)): Likewise.
* libsupc++/eh_aux_runtime.cc (__cxxabiv1::__cxa_bad_cast,
__cxxabiv1::__cxa_bad_typeid): Likewise.
* libsupc++/vec.cc (compute_size): Likewise.
* libsupc++/new_op.cc (operator new (std::size_t)): Likewise.
* src/c++11/functexcept.cc: Likewise.
* testsuite/util/io/illegal_input_error.hpp
(__throw_illegal_input_error): Likewise.
* libsupc++/eh_personality.cc: Avoid warning with -fno-exceptions.
* testsuite/ext/profile/mutex_extensions_neg.cc: Adjust dg-error line
numbers.
* testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc:
Likewise.
* testsuite/23_containers/array/tuple_interface/
tuple_element_debug_neg.cc: Likewise.
* testsuite/23_containers/array/tuple_interface/get_debug_neg.cc:
Likewise.
* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193295 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/ext')
| -rw-r--r-- | libstdc++-v3/include/ext/concurrence.h | 32 | ||||
| -rw-r--r-- | libstdc++-v3/include/ext/pb_ds/exception.hpp | 37 | ||||
| -rw-r--r-- | libstdc++-v3/include/ext/throw_allocator.h | 9 |
3 files changed, 14 insertions, 64 deletions
diff --git a/libstdc++-v3/include/ext/concurrence.h b/libstdc++-v3/include/ext/concurrence.h index 68c679c6b06..50b73290949 100644 --- a/libstdc++-v3/include/ext/concurrence.h +++ b/libstdc++-v3/include/ext/concurrence.h @@ -99,44 +99,20 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // Substitute for concurrence_error object in the case of -fno-exceptions. inline void __throw_concurrence_lock_error() - { -#if __EXCEPTIONS - throw __concurrence_lock_error(); -#else - __builtin_abort(); -#endif - } + { _GLIBCXX_THROW_OR_ABORT(__concurrence_lock_error()); } inline void __throw_concurrence_unlock_error() - { -#if __EXCEPTIONS - throw __concurrence_unlock_error(); -#else - __builtin_abort(); -#endif - } + { _GLIBCXX_THROW_OR_ABORT(__concurrence_unlock_error()); } #ifdef __GTHREAD_HAS_COND inline void __throw_concurrence_broadcast_error() - { -#if __EXCEPTIONS - throw __concurrence_broadcast_error(); -#else - __builtin_abort(); -#endif - } + { _GLIBCXX_THROW_OR_ABORT(__concurrence_broadcast_error()); } inline void __throw_concurrence_wait_error() - { -#if __EXCEPTIONS - throw __concurrence_wait_error(); -#else - __builtin_abort(); -#endif - } + { _GLIBCXX_THROW_OR_ABORT(__concurrence_wait_error()); } #endif class __mutex diff --git a/libstdc++-v3/include/ext/pb_ds/exception.hpp b/libstdc++-v3/include/ext/pb_ds/exception.hpp index 5213fa43aa9..9768ab343db 100644 --- a/libstdc++-v3/include/ext/pb_ds/exception.hpp +++ b/libstdc++-v3/include/ext/pb_ds/exception.hpp @@ -1,7 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 -// Free Software Foundation, Inc. +// Copyright (C) 2005-2012 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -73,39 +72,21 @@ namespace __gnu_pbds /// A container cannot be resized. struct resize_error : public container_error { }; -#if __EXCEPTIONS inline void - __throw_container_error(void) - { throw container_error(); } + __throw_container_error() + { _GLIBCXX_THROW_OR_ABORT(container_error()); } inline void - __throw_insert_error(void) - { throw insert_error(); } + __throw_insert_error() + { _GLIBCXX_THROW_OR_ABORT(insert_error()); } inline void - __throw_join_error(void) - { throw join_error(); } + __throw_join_error() + { _GLIBCXX_THROW_OR_ABORT(join_error()); } inline void - __throw_resize_error(void) - { throw resize_error(); } -#else - inline void - __throw_container_error(void) - { std::abort(); } - - inline void - __throw_insert_error(void) - { std::abort(); } - - inline void - __throw_join_error(void) - { std::abort(); } - - inline void - __throw_resize_error(void) - { std::abort(); } -#endif + __throw_resize_error() + { _GLIBCXX_THROW_OR_ABORT(resize_error()); } //@} } // namespace __gnu_pbds diff --git a/libstdc++-v3/include/ext/throw_allocator.h b/libstdc++-v3/include/ext/throw_allocator.h index 8942232c825..0dbd3512b35 100644 --- a/libstdc++-v3/include/ext/throw_allocator.h +++ b/libstdc++-v3/include/ext/throw_allocator.h @@ -77,14 +77,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // Substitute for forced_error object when -fno-exceptions. inline void __throw_forced_error() - { -#if __EXCEPTIONS - throw forced_error(); -#else - __builtin_abort(); -#endif - } - + { _GLIBCXX_THROW_OR_ABORT(forced_error()); } /** * @brief Base class for checking address and label information |

