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: [PATCH] Fix libstdc++/5579


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.



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