This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/10095] istream::operator>>(int&) sets ios::badbit when ios::failbit is set.
- From: "cvs-commit at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Dec 2003 03:11:03 -0000
- Subject: [Bug libstdc++/10095] istream::operator>>(int&) sets ios::badbit when ios::failbit is set.
- References: <20030315104601.10095.peturr02@ru.is>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2003-12-04 03:11 -------
Subject: Bug 10095
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-3_3-branch
Changes by: bkoz@gcc.gnu.org 2003-12-04 03:10:55
Modified files:
libstdc++-v3 : ChangeLog
Log message:
2003-12-03 Benjamin Kosnik <bkoz@redhat.com>
* include/bits/basic_ios.h (basic_ios::setstate): Revert.
* include/bits/istream.tcc: Only call setstate if __err != goodbit.
* include/bits/ostream.tcc: Same.
* testsuite/27_io/basic_ios/exceptions/char/2.cc: New.
2003-12-03 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/9371
PR libstdc++/9546
PR libstdc++/10093
PR libstdc++/10095
* include/bits/basic_ios.h (basic_ios::setstate): Elide if goodbit.
(basic_ios::_M_setstate): Consolidate common error handling code.
* include/bits/basic_ios.tcc: Tweak.
* include/bits/fstream.tcc: Tweak.
* include/bits/istream.tcc: Use _M_setstate for common exception
handling. Move setstate calls after catch.
(basic_istream::tellg): Check for exceptions thrown by streambuf
virtual functions.
(basic_istream::seekg): Same.
* include/bits/ostream.tcc: Same, but for ostream.
(basic_ostream::flush): Check for exceptions thrown by streambuf
virtual functions.
(basic_istream::tellp): Same.
(basic_istream::seekp): Same.
* include/bits/locale_facets.tcc: Tweak.
* include/bits/streambuf.tcc: Tweak.
(__copy_streambufs): Propagate exceptions.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.1464.2.156&r2=1.1464.2.157
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10095