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


On Sun, Jan 04, 2004 at 11:37:21AM +0100, Paolo Carlini wrote:
> Paolo Carlini wrote:
> 
> >Not just so, something much stronger: Stage2
> >may terminate *only* because in == end, not for different reasons,
> >like two consecutive true discard!!!
> 
> Of course, Stage2 also terminates if the character is neither discarded
> nor accumulated, sorry about that. But, this is my real point, a discarded
> char (a thousand separator, that is) cannot terminate Stage2!!!

Yes, I see now.  That is clearly a Defect.  The BNF constraint was 
supposed to be implied by the second sentence in 22.2.2.1.2p9:

   ... a check is made to determine if c is allowed as the next 
   character of an input field of the conversion specifier returned 
   by stage 1. 

Unfortunately, as a result of what amounts to editing errors, if it's 
a thousands separator then we don't get as far as enforcing the BNF 
properly.  

Feh.  I doubt that the LWG can be counted on to fix this one.  

It's unfortunate that DR358 (thanks Martin) didn't address the whole 
issue, and that I wasn't equipped to participate at the time.  The 
correct fix would have been to reference the BNF, and terminate 
extraction as soon as the BNF was violated.  Sigh.

Nathan Myers
ncm-nospam@cantrip.org


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