[Patch] Fix a serious bug in money_get
Paolo Carlini
pcarlini@suse.de
Sun Feb 15 20:46:00 GMT 2004
Hi,
this is interesting: I wanted just to simplify an overly complex
double loop in the parsing of the remaining sign characters.
Turned out that the double loop lead to an *overly* permissive
parsing (wrong according to 22.2.6.1.2, p3) and a pair of broken
testcases (money_get/.../8.cc, using do_pos_format, which, according
to 22.2.6.1.2, p1 isn't active during input) was passing by chance.
Other tests were also incorrect: the parsing didn't reach the end
of the input, and goodbit instead of eofbit was expected.
This is a pure bug fix and I mean to apply the patch to 3_4 too,
tomorrow.
Tested x86-linux.
Paolo.
/////////////////
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CL_money_get
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20040215/f1559da4/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_money_get
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20040215/f1559da4/attachment-0001.ksh>
More information about the Libstdc++
mailing list