This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH] Fix libstdc++/5579
- From: Paolo Carlini <pcarlini at unitus dot it>
- To: Nathan Myers <ncm-nospam at cantrip dot org>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Sun, 03 Feb 2002 20:39:19 +0100
- Subject: Re: [PATCH] Fix libstdc++/5579
- References: <3C5D5D0C.6C4D4E38@unitus.it> <20020203193004.A6844@cantrip.org>
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.