[RFC] Doubts about digit grouping corner cases

Paolo Carlini pcarlini@suse.de
Sat Jan 3 11:46:00 GMT 2004


Hi,

according to the standard, digit grouping is checked during Stage 3:
22.2.2.1.2, p12.

However, we have some code in _M_extract_int (and float) dealing with
corner cases (basically, __sep_pos == 0) during Stage 2. Testcases
in:

    27_io/basic_istream/extractors_arithmetic/char/07.cc

It seems to me that we could deal easily - and in a strictly conforming
way - with __sep_pos == 0 in __verify_grouping, thus simplifying the
Stage2 parsing loop.

The only user visible effect would be that the iterator would point
after the last digit, not to the first bad thousands_sep. But, again,
in my reading, this is conforming.

Opinions? Different interpretations?

Paolo.



More information about the Libstdc++ mailing list