[PATCH] Fix libstdc++/5579
Paolo Carlini
pcarlini@unitus.it
Sun Feb 3 11:40:00 GMT 2002
Nathan Myers wrote:
> On Sun, Feb 03, 2002 at 04:53:48PM +0100, Paolo Carlini wrote:
> > I have prepared and tested i686-pc-linux-gnu the following fix for 5579.
> > Honestly, I'm not sure that this is 100% conforming, in that I'm not
> > sure about which is the prescribed behaviour when !(__io.flags() &
> > ios_base::showbase) and "symbol" is *not* found in the input stream:
> > with this patch in we fail, whereas currently we *don't* (X)
>
> Can you give examples of formats and sequences that fail, where
> you're not sure if they should?
Thanks for your feedback, Nathan. Indeed, I was subsequently proposed a patch
which does *not* fail, more conforming to the standard, in my humble reading.
Consider my improved patch, there are 2 additional tests (for char and 2 for
wchar_t) which would not have passed with the first version of the patch. In a
nutshell, if the format is { symbol, none, sign, value }, and "symbol" is '$',
then by default (therefore "showbase" false), money::get would have failed for
the input "1234.56". With the second attempt, it does not fail, and of course it
does not fail for "$1234.56" either.
Please let me know if you need some more details,
Thanks
Paolo.
More information about the Libstdc++
mailing list