GNU C++ 3.0 - error in ifstream

Phil Edwards
Mon Jul 16 12:25:00 GMT 2001

On Mon, Jul 16, 2001 at 11:33:54AM +0200, Ulrich Breymann wrote:
> std::ifstream::open() resp. close() do not clear eof/fail-bits.

By design.  This was left unspecified in the C++ standard; a note has been
added that "a successful open does not change the error state."

Personally, I wish a successful open cleared the error state, and I would
give money to hear a rationale for this decision, but there you have it.
No bug.


Would I had phrases that are not known, utterances that are strange, in
new language that has not been used, free from repetition, not an utterance
which has grown stale, which men of old have spoken.
                                     - anonymous Egyptian scribe, c.1700 BC

More information about the Gcc-bugs mailing list