summaryrefslogtreecommitdiffstats
path: root/libstdc++-v3/include/bits
diff options
context:
space:
mode:
authorbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2003-04-18 03:46:44 +0000
committerbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2003-04-18 03:46:44 +0000
commit2113f013b978972368794f4e76b47553d19186e1 (patch)
tree0326c2a9b128a7129dc87509b792fbd101ddc13d /libstdc++-v3/include/bits
parent53028d5dfe6cc0b4f7f408015f495b5b3a24cd80 (diff)
downloadppe42-gcc-2113f013b978972368794f4e76b47553d19186e1.tar.gz
ppe42-gcc-2113f013b978972368794f4e76b47553d19186e1.zip
2003-04-17 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/9555 * include/bits/ostream.tcc: Catch all exceptions for formatted output, instead of std::exception and derivatives. * include/bits/istream.tcc: Same. * testsuite/27_io/basic_ostream/inserters_arithmetic/char/9555-oa.cc: * testsuite/27_io/basic_ostream/inserters_character/char/9555-oc.cc: * testsuite/27_io/basic_ostream/inserters_other/char/9555-oo.cc: * testsuite/27_io/basic_istream/extractors_arithmetic/char/9555-ia.cc: * testsuite/27_io/basic_istream/extractors_character/char/9555-ic.cc: * testsuite/27_io/basic_istream/extractors_other/char/9555-io.cc: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65770 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/bits')
-rw-r--r--libstdc++-v3/include/bits/istream.tcc56
-rw-r--r--libstdc++-v3/include/bits/ostream.tcc34
2 files changed, 45 insertions, 45 deletions
diff --git a/libstdc++-v3/include/bits/istream.tcc b/libstdc++-v3/include/bits/istream.tcc
index 89a84f59f7f..713c7bb6f87 100644
--- a/libstdc++-v3/include/bits/istream.tcc
+++ b/libstdc++-v3/include/bits/istream.tcc
@@ -118,7 +118,7 @@ namespace std
this->_M_fnumget->get(*this, 0, *this, __err, __n);
this->setstate(__err);
}
- catch(exception& __fail)
+ catch(...)
{
// 27.6.1.2.1 Common requirements.
// Turn this on without causing an ios::failure to be thrown.
@@ -155,7 +155,7 @@ namespace std
#endif
this->setstate(__err);
}
- catch(exception& __fail)
+ catch(...)
{
// 27.6.1.2.1 Common requirements.
// Turn this on without causing an ios::failure to be thrown.
@@ -182,7 +182,7 @@ namespace std
this->_M_fnumget->get(*this, 0, *this, __err, __n);
this->setstate(__err);
}
- catch(exception& __fail)
+ catch(...)
{
// 27.6.1.2.1 Common requirements.
// Turn this on without causing an ios::failure to be thrown.
@@ -219,7 +219,7 @@ namespace std
#endif
this->setstate(__err);
}
- catch(exception& __fail)
+ catch(...)
{
// 27.6.1.2.1 Common requirements.
// Turn this on without causing an ios::failure to be thrown.
@@ -246,7 +246,7 @@ namespace std
this->_M_fnumget->get(*this, 0, *this, __err, __n);
this->setstate(__err);
}
- catch(exception& __fail)
+ catch(...)
{
// 27.6.1.2.1 Common requirements.
// Turn this on without causing an ios::failure to be thrown.
@@ -273,7 +273,7 @@ namespace std
this->_M_fnumget->get(*this, 0, *this, __err, __n);
this->setstate(__err);
}
- catch(exception& __fail)
+ catch(...)
{
// 27.6.1.2.1 Common requirements.
// Turn this on without causing an ios::failure to be thrown.
@@ -300,7 +300,7 @@ namespace std
this->_M_fnumget->get(*this, 0, *this, __err, __n);
this->setstate(__err);
}
- catch(exception& __fail)
+ catch(...)
{
// 27.6.1.2.1 Common requirements.
// Turn this on without causing an ios::failure to be thrown.
@@ -328,7 +328,7 @@ namespace std
this->_M_fnumget->get(*this, 0, *this, __err, __n);
this->setstate(__err);
}
- catch(exception& __fail)
+ catch(...)
{
// 27.6.1.2.1 Common requirements.
// Turn this on without causing an ios::failure to be thrown.
@@ -355,7 +355,7 @@ namespace std
this->_M_fnumget->get(*this, 0, *this, __err, __n);
this->setstate(__err);
}
- catch(exception& __fail)
+ catch(...)
{
// 27.6.1.2.1 Common requirements.
// Turn this on without causing an ios::failure to be thrown.
@@ -383,7 +383,7 @@ namespace std
this->_M_fnumget->get(*this, 0, *this, __err, __n);
this->setstate(__err);
}
- catch(exception& __fail)
+ catch(...)
{
// 27.6.1.2.1 Common requirements.
// Turn this on without causing an ios::failure to be thrown.
@@ -410,7 +410,7 @@ namespace std
this->_M_fnumget->get(*this, 0, *this, __err, __n);
this->setstate(__err);
}
- catch(exception& __fail)
+ catch(...)
{
// 27.6.1.2.1 Common requirements.
// Turn this on without causing an ios::failure to be thrown.
@@ -437,7 +437,7 @@ namespace std
this->_M_fnumget->get(*this, 0, *this, __err, __n);
this->setstate(__err);
}
- catch(exception& __fail)
+ catch(...)
{
// 27.6.1.2.1 Common requirements.
// Turn this on without causing an ios::failure to be thrown.
@@ -464,7 +464,7 @@ namespace std
this->_M_fnumget->get(*this, 0, *this, __err, __n);
this->setstate(__err);
}
- catch(exception& __fail)
+ catch(...)
{
// 27.6.1.2.1 Common requirements.
// Turn this on without causing an ios::failure to be thrown.
@@ -495,7 +495,7 @@ namespace std
if (!__sbout || !__xtrct)
this->setstate(ios_base::failbit);
}
- catch(exception& __fail)
+ catch(...)
{
// 27.6.2.5.1 Common requirements.
// Turn this on without causing an ios::failure to be thrown.
@@ -527,7 +527,7 @@ namespace std
else
this->setstate(ios_base::eofbit | ios_base::failbit);
}
- catch(exception& __fail)
+ catch(...)
{
// 27.6.1.3 paragraph 1
// Turn this on without causing an ios::failure to be thrown.
@@ -561,7 +561,7 @@ namespace std
else
this->setstate(ios_base::eofbit | ios_base::failbit);
}
- catch(exception& __fail)
+ catch(...)
{
// 27.6.1.3 paragraph 1
// Turn this on without causing an ios::failure to be thrown.
@@ -600,7 +600,7 @@ namespace std
if (traits_type::eq_int_type(__c, __eof))
this->setstate(ios_base::eofbit);
}
- catch(exception& __fail)
+ catch(...)
{
// 27.6.1.3 paragraph 1
// Turn this on without causing an ios::failure to be thrown.
@@ -643,7 +643,7 @@ namespace std
if (traits_type::eq_int_type(__c, __eof))
this->setstate(ios_base::eofbit);
}
- catch(exception& __fail)
+ catch(...)
{
// 27.6.1.3 paragraph 1
// Turn this on without causing an ios::failure to be thrown.
@@ -694,7 +694,7 @@ namespace std
this->setstate(ios_base::failbit);
}
}
- catch(exception& __fail)
+ catch(...)
{
// 27.6.1.3 paragraph 1
// Turn this on without causing an ios::failure to be thrown.
@@ -735,7 +735,7 @@ namespace std
if (traits_type::eq_int_type(__c, __eof))
this->setstate(ios_base::eofbit);
}
- catch(exception& __fail)
+ catch(...)
{
// 27.6.1.3 paragraph 1
// Turn this on without causing an ios::failure to be thrown.
@@ -759,7 +759,7 @@ namespace std
{
try
{ __c = this->rdbuf()->sgetc(); }
- catch(exception& __fail)
+ catch(...)
{
// 27.6.1.3 paragraph 1
// Turn this on without causing an ios::failure to be thrown.
@@ -786,7 +786,7 @@ namespace std
if (_M_gcount != __n)
this->setstate(ios_base::eofbit | ios_base::failbit);
}
- catch(exception& __fail)
+ catch(...)
{
// 27.6.1.3 paragraph 1
// Turn this on without causing an ios::failure to be thrown.
@@ -822,7 +822,7 @@ namespace std
else
this->setstate(ios_base::eofbit);
}
- catch(exception& __fail)
+ catch(...)
{
// 27.6.1.3 paragraph 1
// Turn this on without causing an ios::failure to be thrown.
@@ -853,7 +853,7 @@ namespace std
|| traits_type::eq_int_type(__sb->sputbackc(__c), __eof))
this->setstate(ios_base::badbit);
}
- catch(exception& __fail)
+ catch(...)
{
// 27.6.1.3 paragraph 1
// Turn this on without causing an ios::failure to be thrown.
@@ -884,7 +884,7 @@ namespace std
|| traits_type::eq_int_type(__sb->sungetc(), __eof))
this->setstate(ios_base::badbit);
}
- catch(exception& __fail)
+ catch(...)
{
// 27.6.1.3 paragraph 1
// Turn this on without causing an ios::failure to be thrown.
@@ -919,7 +919,7 @@ namespace std
__ret = 0;
}
}
- catch(exception& __fail)
+ catch(...)
{
// 27.6.1.3 paragraph 1
// Turn this on without causing an ios::failure to be thrown.
@@ -995,7 +995,7 @@ namespace std
{
try
{ __in.get(__c); }
- catch(exception& __fail)
+ catch(...)
{
// 27.6.1.2.1 Common requirements.
// Turn this on without causing an ios::failure to be thrown.
@@ -1052,7 +1052,7 @@ namespace std
#endif
__in.width(0);
}
- catch(exception& __fail)
+ catch(...)
{
// 27.6.1.2.1 Common requirements.
// Turn this on without causing an ios::failure to be thrown.
diff --git a/libstdc++-v3/include/bits/ostream.tcc b/libstdc++-v3/include/bits/ostream.tcc
index 64b37a48826..fc7d08a1b6e 100644
--- a/libstdc++-v3/include/bits/ostream.tcc
+++ b/libstdc++-v3/include/bits/ostream.tcc
@@ -66,7 +66,7 @@ namespace std
{
try
{ __pf(*this); }
- catch(exception& __fail)
+ catch(...)
{
// 27.6.2.5.1 Common requirements.
// Turn this on without causing an ios::failure to be thrown.
@@ -88,7 +88,7 @@ namespace std
{
try
{ __pf(*this); }
- catch(exception& __fail)
+ catch(...)
{
// 27.6.2.5.1 Common requirements.
// Turn this on without causing an ios::failure to be thrown.
@@ -110,7 +110,7 @@ namespace std
{
try
{ __pf(*this); }
- catch(exception& __fail)
+ catch(...)
{
// 27.6.2.5.1 Common requirements.
// Turn this on without causing an ios::failure to be thrown.
@@ -134,7 +134,7 @@ namespace std
if (!__copy_streambufs(*this, __sbin, this->rdbuf()))
this->setstate(ios_base::failbit);
}
- catch(exception& __fail)
+ catch(...)
{
// 27.6.2.5.1 Common requirements.
// Turn this on without causing an ios::failure to be thrown.
@@ -162,7 +162,7 @@ namespace std
this->fill(), __n).failed())
this->setstate(ios_base::badbit);
}
- catch(exception& __fail)
+ catch(...)
{
// 27.6.1.2.1 Common requirements.
// Turn this on without causing an ios::failure to be thrown.
@@ -201,7 +201,7 @@ namespace std
this->setstate(ios_base::badbit);
}
}
- catch(exception& __fail)
+ catch(...)
{
// 27.6.1.2.1 Common requirements.
// Turn this on without causing an ios::failure to be thrown.
@@ -227,7 +227,7 @@ namespace std
this->fill(), __n).failed())
this->setstate(ios_base::badbit);
}
- catch(exception& __fail)
+ catch(...)
{
// 27.6.1.2.1 Common requirements.
// Turn this on without causing an ios::failure to be thrown.
@@ -268,7 +268,7 @@ namespace std
this->setstate(ios_base::badbit);
}
}
- catch(exception& __fail)
+ catch(...)
{
// 27.6.1.2.1 Common requirements.
// Turn this on without causing an ios::failure to be thrown.
@@ -294,7 +294,7 @@ namespace std
this->fill(), __n).failed())
this->setstate(ios_base::badbit);
}
- catch(exception& __fail)
+ catch(...)
{
// 27.6.1.2.1 Common requirements.
// Turn this on without causing an ios::failure to be thrown.
@@ -321,7 +321,7 @@ namespace std
this->fill(), __n).failed())
this->setstate(ios_base::badbit);
}
- catch(exception& __fail)
+ catch(...)
{
// 27.6.1.2.1 Common requirements.
// Turn this on without causing an ios::failure to be thrown.
@@ -347,7 +347,7 @@ namespace std
this->fill(), __n).failed())
this->setstate(ios_base::badbit);
}
- catch(exception& __fail)
+ catch(...)
{
// 27.6.1.2.1 Common requirements.
// Turn this on without causing an ios::failure to be thrown.
@@ -373,7 +373,7 @@ namespace std
this->fill(), __n).failed())
this->setstate(ios_base::badbit);
}
- catch(exception& __fail)
+ catch(...)
{
// 27.6.1.2.1 Common requirements.
// Turn this on without causing an ios::failure to be thrown.
@@ -495,7 +495,7 @@ namespace std
__out._M_write(__pads, __len);
__out.width(0);
}
- catch(exception& __fail)
+ catch(...)
{
// 27.6.1.2.1 Common requirements.
// Turn this on without causing an ios::failure to be thrown.
@@ -531,7 +531,7 @@ namespace std
__out._M_write(__pads, __len);
__out.width(0);
}
- catch(exception& __fail)
+ catch(...)
{
// 27.6.1.2.1 Common requirements.
// Turn this on without causing an ios::failure to be thrown.
@@ -566,7 +566,7 @@ namespace std
__out._M_write(__s, __len);
__out.width(0);
}
- catch(exception& __fail)
+ catch(...)
{
// 27.6.1.2.1 Common requirements.
// Turn this on without causing an ios::failure to be thrown.
@@ -615,7 +615,7 @@ namespace std
__out._M_write(__str, __len);
__out.width(0);
}
- catch(exception& __fail)
+ catch(...)
{
// 27.6.1.2.1 Common requirements.
// Turn this on without causing an ios::failure to be thrown.
@@ -654,7 +654,7 @@ namespace std
__out._M_write(__s, __len);
__out.width(0);
}
- catch(exception& __fail)
+ catch(...)
{
// 27.6.1.2.1 Common requirements.
// Turn this on without causing an ios::failure to be thrown.
OpenPOWER on IntegriCloud