diff options
author | Jason Merrill <jason@redhat.com> | 2007-05-07 17:27:54 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2007-05-07 17:27:54 -0400 |
commit | d05f74f16e130e97210ad2eaad12915192ea8c9e (patch) | |
tree | c30258339d2a08a69bc22ef35afceb0e8fe1957c /libstdc++-v3/include/ext | |
parent | 1e7c1ba87df3e201199408f4cef5cbd0aaad475a (diff) | |
download | gcc-d05f74f16e130e97210ad2eaad12915192ea8c9e.zip gcc-d05f74f16e130e97210ad2eaad12915192ea8c9e.tar.gz gcc-d05f74f16e130e97210ad2eaad12915192ea8c9e.tar.bz2 |
re PR other/28145 (C++ (throw() and catch(...) {/* fall through */ } ) and pthread cancellation are incompatible (at least with NPTL))
PR c++/28145
* libsupc++/cxxabi.h (__forced_unwind, __foreign_exception):
New classes.
* libsupc++/eh_exception.cc: Define their destructors.
* config/abi/pre/gnu.ver: Export their type_infos.
* config/abi/pre/gnu-versioned-namespace.ver: Likewise.
* libsupc++/eh_personality.cc: A handler for abi::__forced_unwind
matches a forced unwind, and a handler for abi::__foreign_exception
matches a foreign exception.
* include/bits/istream.tcc: Rethrow forced unwind.
* include/bits/ostream.tcc: Likewise.
* include/bits/ostream_insert.h: Likewise.
* include/bits/basic_string.tcc (operator>>, getline): Likewise.
* include/bits/fstream.tcc (basic_filebuf::close): Likewise.
* include/ext/vstring.cc (operator>>, getline): Likewise.
* src/istream.cc: Likewise.
* src/compatibility.cc (basic_istream::ignore): Likewise.
* include/std/bitset (operator>>): Likewise.
* include/std/fstream (basic_filebuf::close): Remove throw() spec.
* libsupc++/cxxabi-internal.h: Split out from...
* libsupc++/cxxabi.h: ...here.
From-SVN: r124517
Diffstat (limited to 'libstdc++-v3/include/ext')
-rw-r--r-- | libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp | 2 | ||||
-rw-r--r-- | libstdc++-v3/include/ext/vstring.tcc | 12 |
2 files changed, 13 insertions, 1 deletions
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp b/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp index aa29e07..9c67375 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp @@ -265,7 +265,7 @@ set_loads(std::pair<float, float> load_pair) m_load_max = load_pair.second; do_resize(static_cast<size_type>(size_base::get_size() / ((m_load_min + m_load_max) / 2))); } - catch (...) + catch(...) { m_load_min = old_load_min; m_load_max = old_load_max; diff --git a/libstdc++-v3/include/ext/vstring.tcc b/libstdc++-v3/include/ext/vstring.tcc index 7d03017..7f3478a 100644 --- a/libstdc++-v3/include/ext/vstring.tcc +++ b/libstdc++-v3/include/ext/vstring.tcc @@ -38,6 +38,8 @@ #pragma GCC system_header +#include <cxxabi-internal.h> + _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) template<typename _CharT, typename _Traits, typename _Alloc, @@ -598,6 +600,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __err |= __ios_base::eofbit; __in.width(0); } + catch(__cxxabiv1::__forced_unwind&) + { + __in._M_setstate(__ios_base::badbit); + __throw_exception_again; + } catch(...) { // _GLIBCXX_RESOLVE_LIB_DEFECTS @@ -669,6 +676,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std) else __err |= __ios_base::failbit; } + catch(__cxxabiv1::__forced_unwind&) + { + __in._M_setstate(__ios_base::badbit); + __throw_exception_again; + } catch(...) { // _GLIBCXX_RESOLVE_LIB_DEFECTS |