Article View: gnu.g++.lib.bug
Article #151BUG in istream input near end of file
From: Doug Lea
Date: Tue, 17 Oct 1989 10:42
Date: Tue, 17 Oct 1989 10:42
26 lines
1178 bytes
1178 bytes
Thanks for the helpful bug report.
The problem was that several of the istream op >> functions
used the construct
while (good()) { get(ch) ... }
when instead they should have done
if (good()) { while (get(ch)) { ... } ... }
Sorry for the slip.
Streams DO use the unix convention that you don't know if you've
reached EOF until you've tried to read a char and failed, but this
behavior is localized to get(char).
These are all fixed for the next release (1.36.0), which, at long
last, should be out within a few days.
AT&T 2.0-compatible iostream classes are in the works, but won't make it
into 1.36.0. They should be ready within a month or so.
-Doug
Technical Details
Message-ID:
<8910171042.AA11815@g.oswego.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!uwm.edu!gem.mps.ohio-state.edu!tut.cis.ohio-state.edu!G.OSWEGO.EDU!dlReferences:
<8910162147.AA26491@idris.id.dk>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!uwm.edu!gem.mps.ohio-state.edu!tut.cis.ohio-state.edu!G.OSWEGO.EDU!dl From: dl@G.OSWEGO.EDU (Doug Lea) Newsgroups: gnu.g++.lib.bug Subject: BUG in istream input near end of file Message-ID: <8910171042.AA11815@g.oswego.edu> Date: 17 Oct 89 10:42:01 GMT References: <8910162147.AA26491@idris.id.dk> Sender: daemon@tut.cis.ohio-state.edu Reply-To: dl@oswego.oswego.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 26