This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]