summaryrefslogtreecommitdiff
path: root/libstdc++-v3/src/istream.cc
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2007-05-07 21:27:54 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2007-05-07 21:27:54 +0000
commitcb4b339b6f81d21a2dd4e20acfe698a2e7226857 (patch)
treec30258339d2a08a69bc22ef35afceb0e8fe1957c /libstdc++-v3/src/istream.cc
parent7e16444b9864a56cf9e656570965978693d7d1df (diff)
downloadgcc-cb4b339b6f81d21a2dd4e20acfe698a2e7226857.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124517 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/src/istream.cc')
-rw-r--r--libstdc++-v3/src/istream.cc40
1 files changed, 40 insertions, 0 deletions
diff --git a/libstdc++-v3/src/istream.cc b/libstdc++-v3/src/istream.cc
index 0f24340e031..319202ee4c3 100644
--- a/libstdc++-v3/src/istream.cc
+++ b/libstdc++-v3/src/istream.cc
@@ -91,6 +91,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
else
__err |= ios_base::failbit;
}
+ catch(__cxxabiv1::__forced_unwind&)
+ {
+ this->_M_setstate(ios_base::badbit);
+ __throw_exception_again;
+ }
catch(...)
{ this->_M_setstate(ios_base::badbit); }
}
@@ -177,6 +182,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
__sb->sbumpc();
}
}
+ catch(__cxxabiv1::__forced_unwind&)
+ {
+ this->_M_setstate(ios_base::badbit);
+ __throw_exception_again;
+ }
catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
@@ -251,6 +261,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
*__s = __char_type();
__in.width(0);
}
+ catch(__cxxabiv1::__forced_unwind&)
+ {
+ __in._M_setstate(ios_base::badbit);
+ __throw_exception_again;
+ }
catch(...)
{ __in._M_setstate(ios_base::badbit); }
}
@@ -321,6 +336,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
@@ -401,6 +421,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
@@ -473,6 +498,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
else
__err |= ios_base::failbit;
}
+ catch(__cxxabiv1::__forced_unwind&)
+ {
+ this->_M_setstate(ios_base::badbit);
+ __throw_exception_again;
+ }
catch(...)
{ this->_M_setstate(ios_base::badbit); }
}
@@ -559,6 +589,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
__sb->sbumpc();
}
}
+ catch(__cxxabiv1::__forced_unwind&)
+ {
+ this->_M_setstate(ios_base::badbit);
+ __throw_exception_again;
+ }
catch(...)
{ this->_M_setstate(ios_base::badbit); }
if (__err)
@@ -632,6 +667,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