This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
[RFC] Doubts about digit grouping corner cases
- From: Paolo Carlini <pcarlini at suse dot de>
- To: libstdc++ <libstdc++ at gcc dot gnu dot org>, Nathan Myers <ncm at cantrip dot org>
- Date: Sat, 03 Jan 2004 12:47:29 +0100
- Subject: [RFC] Doubts about digit grouping corner cases
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.