From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25539 invoked by alias); 18 Feb 2003 10:01:36 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 25516 invoked by uid 48); 18 Feb 2003 10:01:35 -0000 Date: Tue, 18 Feb 2003 10:01:00 -0000 Message-ID: <20030218100135.25515.qmail@sources.redhat.com> To: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, paolo@gcc.gnu.org, pergj@newmad.no From: paolo@gcc.gnu.org Reply-To: paolo@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, paolo@gcc.gnu.org, pergj@newmad.no, gcc-gnats@gcc.gnu.org Subject: Re: libstdc++/9657: [3.2/3.3/3.4 regression] Incorrect parsing when using istringstream::str X-SW-Source: 2003-02/txt/msg00781.txt.bz2 List-Id: Synopsis: [3.2/3.3/3.4 regression] Incorrect parsing when using istringstream::str Responsible-Changed-From-To: unassigned->paolo Responsible-Changed-By: paolo Responsible-Changed-When: Tue Feb 18 10:01:34 2003 Responsible-Changed-Why: Analyzed. State-Changed-From-To: analyzed->closed State-Changed-By: paolo State-Changed-When: Tue Feb 18 10:01:34 2003 State-Changed-Why: Not a bug, but behaviour mandated by the standard, now implemented correctly. After the first extraction iss.good() is false and iss.eof() is true since the end of the string is reached during the extraction. Therefore istream::sentry blocks the second extraction. User code can be fixed either initializing the first time with "1 " (space after 1), or clearing the stream state before the second extraction (iss.clear()). Thanks for your report, Paolo. P.S. In fact we _test_ in the testsuite for this behaviour, in istringstream_members.cc http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9657