This is the mail archive of the libstdc++@sources.redhat.com mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [bug] istream::getline(char*,streamsize) still broken


> | 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]