This is the mail archive of the
libstdc++@sources.redhat.com
mailing list for the libstdc++ project.
Re: [bug] istream::getline(char*,streamsize) still broken
- To: brent verner <brent at rcfile dot org>
- Subject: Re: [bug] istream::getline(char*,streamsize) still broken
- From: Benjamin Kosnik <bkoz at redhat dot com>
- Date: Thu, 20 Jul 2000 22:31:33 -0700 (PDT)
- cc: stdc++ <libstdc++ at sourceware dot cygnus dot com>
> | over it - 1 (4) would be incorrect.
>
> ...hmm
>
> 27.6.1.3 says:
extracts chars and stores them into successive locaitons of an aray whos
first element is designated by S. Characters are extracted and stored
until one of the following occurs:
1) eof
2) c == delim
3) n - 1 stored
conditions tested in order shown
> ... so we canmust extract n characters
no, not if n - 1 are stored. Then no more are extracted...
> character is the delimiter. I still believe the patch to istream.cc
> will enforce proper behavior. It does cause a couple of failures (bad
> tests IMO) in the testsuite, which I will address/justify when I get
> a breather :) I _seriously_ believe the tests in the original message
> accurately enforce the std.
Hmm. You haven't proven your case
;)
In anycase, a patch that admits testcase breakage is probably a better
way to go, so next time at least note that things broke (or make the
changes and add commentary--which is by far the superior solution.)
best,
benjamin