aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/ext/vstring.tcc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2007-05-07 17:27:54 -0400
committerJason Merrill <jason@gcc.gnu.org>2007-05-07 17:27:54 -0400
commitd05f74f16e130e97210ad2eaad12915192ea8c9e (patch)
treec30258339d2a08a69bc22ef35afceb0e8fe1957c /libstdc++-v3/include/ext/vstring.tcc
parent1e7c1ba87df3e201199408f4cef5cbd0aaad475a (diff)
downloadgcc-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/vstring.tcc')
-rw-r--r--libstdc++-v3/include/ext/vstring.tcc12
1 files changed, 12 insertions, 0 deletions
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