[PATCH] libstdc++/5045: wrong numeric_limits::digits10 for integer types
Paolo Carlini
pcarlini@unitus.it
Wed Dec 12 03:12:00 GMT 2001
Gabriel Dos Reis wrote:
> Paolo Carlini <pcarlini@unitus.it> writes:
>
> | Gabriel Dos Reis wrote:
> |
> | > Benjamin Kosnik <bkoz@redhat.com> writes:
> | >
> | > | > May I apply the following patch?
> | > |
> | > | Please wait for Gaby to ok and make a test case please.
> | >
> | > [ Apologies for the late reply. I've been kept away from GCC for some
> | > good reasons ;-) ]
> | >
> | > The patch is OK. Thanks.
> |
> | Thanks Gaby for your awaited feedback. May I assume that you are
> | approving the *final* version of the patch, that appearing in:
> |
> | http://gcc.gnu.org/ml/libstdc++/2001-12/msg00184.html
>
> Well, this area is one the fuzziest area of numeric_limits<>.
This can be also inferred from the fact that it took to me (us) *many* days
to track down all the necessary changes... ;-)
> >From the standard point of view any number can be represented
> exactly as a bool given the mapping (zero |-> false, nonzero |-> true).
> As such, I think numeric_limits<unsigned long>::digits10 is a valid
> value, but that is just being pedantic.
>
> >From my point of view, there is a defect to raise:
> numeric_limits<bool>::digits10 is meaningless.
I know. Yesterday, I read the full text of the DR.
> For the meantime, yes you can apply the final version.
Thanks. Iwill update my sources, test again and commit.
Cheers,
Paolo.
More information about the Libstdc++
mailing list