This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: libstdc++/9657: [3.2/3.3/3.4 regression] Incorrect parsing when using istringstream::str
- From: paolo at gcc dot gnu dot org
- To: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, paolo at gcc dot gnu dot org, pergj at newmad dot no
- Date: 18 Feb 2003 10:01:35 -0000
- Subject: Re: libstdc++/9657: [3.2/3.3/3.4 regression] Incorrect parsing when using istringstream::str
- Reply-to: paolo at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, paolo at gcc dot gnu dot org, pergj at newmad dot no, gcc-gnats at gcc dot gnu dot org
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