[PATCH] Fix libstdc++/5045 (take3)

Philip Martin philip@codematters.co.uk
Tue Dec 11 06:05:00 GMT 2001


Paolo Carlini <pcarlini@unitus.it> writes:

> Well, in fact, also 27_io/istream_extractor_arith.cc is affected by this subtle twist in the
> meaning of digits10. So I have updated the patch in the following way.
> Testing again...
> 
> Cheers,
> Paolo.
> 
> //////////////
> 
> 
> 2001-12-10  Paolo Carlini  <pcarlini@unitus.it>
>             Philip Martin  <philip@codematters.co.uk>
> 
>         libstdc++/5045
>         * include/bits/std_limits.h: Fix __glibcpp_XX_digits10 defines for
>         integral types.
>         * include/bits/locale_facets.tcc (num_get::do_get for integral types):
>         Tweak _M_extract_int call.
>         * testsuite/27_io/istream_extractor_arith.cc (test13, test12_aux): Tweak
>         overflowing number of digits.
>         * testsuite/18_support/numeric_limits.cc: Add testcase.
> 
> diff -urN libstdc++-v3-vanilla/include/bits/locale_facets.tcc
> libstdc++-v3/include/bits/locale_facets.tcc
> --- libstdc++-v3-vanilla/include/bits/locale_facets.tcc Mon Dec 10 14:37:55 2001
> +++ libstdc++-v3/include/bits/locale_facets.tcc Mon Dec 10 21:03:05 2001
> @@ -455,8 +455,12 @@

What about the use of digits10 at line 394?  Although it's within a
#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS block, the code follows the
same pattern as the other cases.

Philip



More information about the Libstdc++ mailing list