From mboxrd@z Thu Jan 1 00:00:00 1970 From: bkoz@gcc.gnu.org To: bkoz@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, kenny.simpson@gs.com, nobody@gcc.gnu.org, theonetruekenny@yahoo.com Subject: Re: libstdc++/3141: DR 243: basic_istream::get and getline when sentry reports failure Date: Tue, 12 Jun 2001 14:36:00 -0000 Message-id: <20010612213631.2423.qmail@sourceware.cygnus.com> X-SW-Source: 2001-06/msg00508.html List-Id: 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