libstdc++/9657: [3.2/3.3/3.4 regression] Incorrect parsing when using istringstream::str
paolo@gcc.gnu.org
paolo@gcc.gnu.org
Tue Feb 18 10:01:00 GMT 2003
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
More information about the Gcc-bugs
mailing list