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]

Re: [RFC] Doubts about digit grouping corner cases


Nathan Myers wrote:

Besides the description of the phases of numeric parsing, there
is also the BNF descriptions of number formats found in the
num_punct section. The idea is, the syntax tells you what
characters to extract, and then the rest tells how to construct a
number from the characters extracted, or to fail.

Thanks for pointing this out: in fact I browse the num_punct section far less frequently, my bad...

Anyway, regarding the specific issue I think are more relevant the
num_get prescriptions: I'm not arguing about failing or not failing
(we do fail in the very same cases before and after my patch), only
about *when* the grouping must be checked: this affects only the final
value of the 'in' iterator: it seems to me that grouping must always
be checked in Stage3. In other terms: a number rejected only because
of wrong thousand separators (not due to other problems) should always
imply a final 'in' iterator pointing to the end of the series of
digits.

Paolo.


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