This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/14653] Semantics of ifstream.bad have changed from gcc 2.95.3 to gcc 3.2.3
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Mar 2004 15:52:51 -0000
- Subject: [Bug libstdc++/14653] Semantics of ifstream.bad have changed from gcc 2.95.3 to gcc 3.2.3
- References: <20040319154454.14653.saunak.chakrabarti@gs.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-03-19 15:52 -------
The bad function is not correct in this situtiation:
>From the C++ standard, 27.4.2.1.3:
badbit indicates a loss of integrity in an input or output sequence (such as an irrecoverable read error
from a file);
eofbit indicates that an input operation reached the end of an input sequence;
failbit indicates that an input operation failed to read the expected characters, or that an output
operation failed to generate the desired characters.
Looks like fail is what is needed here.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Component|c++ |libstdc++
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14653