This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: libstdc++/3141: DR 243: basic_istream::get and getline when sentry reports failure
- To: bkoz at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, kenny dot simpson at gs dot com, nobody at gcc dot gnu dot org, theonetruekenny at yahoo dot com
- Subject: Re: libstdc++/3141: DR 243: basic_istream::get and getline when sentry reports failure
- From: bkoz at gcc dot gnu dot org
- Date: 12 Jun 2001 21:36:31 -0000
Synopsis: DR 243: basic_istream::get and getline when sentry reports failure
Responsible-Changed-From-To: unassigned->bkoz
Responsible-Changed-By: bkoz
Responsible-Changed-When: Tue Jun 12 14:36:31 2001
Responsible-Changed-Why:
Mine.
State-Changed-From-To: open->feedback
State-Changed-By: bkoz
State-Changed-When: Tue Jun 12 14:36:31 2001
State-Changed-Why:
I've made the char_type() changes.
For the rest, I think your analysis is wrong. The point is that the terminating NULL *is* added unconditionally, and this is clarifying language to support this. Thus, the moving of the adding char_type() to terminate the string inside the if(sentry) loop would cause a defect, not fix one.
There's a reason for the not checking n > 0 for the second bit, I can't remember it offhand but it has to do with changing required error flags. It's checked for in the testsuite, so changing this one small bit will probably show the failure. Anyway.
-benjamin
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3141&database=gcc