public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: libstdc++/5045: wrong value std::numeric_limits<T>::digits10 for integer types
@ 2001-12-12 16:16 paolo
  0 siblings, 0 replies; 5+ messages in thread
From: paolo @ 2001-12-12 16:16 UTC (permalink / raw)
  To: paolo; +Cc: gcc-prs

The following reply was made to PR libstdc++/5045; it has been noted by GNATS.

From: paolo@gcc.gnu.org
To: gcc-bugs@gcc.gnu.org, gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org,
  paolo@gcc.gnu.org, pmartin@uklinux.net
Cc:  
Subject: Re: libstdc++/5045: wrong value std::numeric_limits<T>::digits10 for integer types
Date: 13 Dec 2001 00:08:26 -0000

 Synopsis: wrong value std::numeric_limits<T>::digits10 for integer types
 
 State-Changed-From-To: feedback->closed
 State-Changed-By: paolo
 State-Changed-When: Wed Dec 12 16:08:25 2001
 State-Changed-Why:
     Fixed in mainline.
     
     CVSROOT:        /cvs/gcc
     Module name:    gcc
     Changes by:     paolo@gcc.gnu.org       2001-12-12 12:23:30
     
     Modified files:
             libstdc++-v3   : ChangeLog 
             libstdc++-v3/include/bits: std_limits.h locale_facets.tcc 
             libstdc++-v3/testsuite/18_support: numeric_limits.cc 
             libstdc++-v3/testsuite/27_io: istream_extractor_arith.cc 
     
     Log message:
             2001-12-12  Philip Martin  <philip@codematters.co.uk>
             Ross Smith     <r-smith@ihug.co.nz>
             Paolo Carlini  <pcarlini@unitus.it>
             
             libstdc++/5045
             * include/bits/std_limits.h (defines, numeric_limits<bool>::digits10):
             Fix digits10 values 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 (test03): New testcase.
     
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=5045&database=gcc


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: libstdc++/5045: wrong value std::numeric_limits<T>::digits10 for integer types
@ 2001-12-12 16:08 paolo
  0 siblings, 0 replies; 5+ messages in thread
From: paolo @ 2001-12-12 16:08 UTC (permalink / raw)
  To: gcc-bugs, gcc-gnats, gcc-prs, paolo, pmartin

Synopsis: wrong value std::numeric_limits<T>::digits10 for integer types

State-Changed-From-To: feedback->closed
State-Changed-By: paolo
State-Changed-When: Wed Dec 12 16:08:25 2001
State-Changed-Why:
    Fixed in mainline.
    
    CVSROOT:        /cvs/gcc
    Module name:    gcc
    Changes by:     paolo@gcc.gnu.org       2001-12-12 12:23:30
    
    Modified files:
            libstdc++-v3   : ChangeLog 
            libstdc++-v3/include/bits: std_limits.h locale_facets.tcc 
            libstdc++-v3/testsuite/18_support: numeric_limits.cc 
            libstdc++-v3/testsuite/27_io: istream_extractor_arith.cc 
    
    Log message:
            2001-12-12  Philip Martin  <philip@codematters.co.uk>
            Ross Smith     <r-smith@ihug.co.nz>
            Paolo Carlini  <pcarlini@unitus.it>
            
            libstdc++/5045
            * include/bits/std_limits.h (defines, numeric_limits<bool>::digits10):
            Fix digits10 values 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 (test03): New testcase.
    

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=5045&database=gcc


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: libstdc++/5045: wrong value std::numeric_limits<T>::digits10 for integer types
@ 2001-12-08  1:46 paolo
  0 siblings, 0 replies; 5+ messages in thread
From: paolo @ 2001-12-08  1:46 UTC (permalink / raw)
  To: paolo; +Cc: gcc-prs

The following reply was made to PR libstdc++/5045; it has been noted by GNATS.

From: paolo@gcc.gnu.org
To: gcc-bugs@gcc.gnu.org, gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org,
  nobody@gcc.gnu.org, paolo@gcc.gnu.org, pmartin@uklinux.net
Cc:  
Subject: Re: libstdc++/5045: wrong value std::numeric_limits<T>::digits10 for integer types
Date: 8 Dec 2001 09:43:40 -0000

 Synopsis: wrong value std::numeric_limits<T>::digits10 for integer types
 
 Responsible-Changed-From-To: unassigned->paolo
 Responsible-Changed-By: paolo
 Responsible-Changed-When: Sat Dec  8 01:43:39 2001
 Responsible-Changed-Why:
     Taking care of it.
 State-Changed-From-To: open->feedback
 State-Changed-By: paolo
 State-Changed-When: Sat Dec  8 01:43:39 2001
 State-Changed-Why:
     You are correct. Could you please check that the 
     following patch is ok?
     
       http://gcc.gnu.org/ml/libstdc++/2001-12/msg00123.html
     
     Thanks!
     Paolo.	
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=5045&database=gcc


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: libstdc++/5045: wrong value std::numeric_limits<T>::digits10 for integer types
@ 2001-12-08  1:43 paolo
  0 siblings, 0 replies; 5+ messages in thread
From: paolo @ 2001-12-08  1:43 UTC (permalink / raw)
  To: gcc-bugs, gcc-gnats, gcc-prs, nobody, paolo, pmartin

Synopsis: wrong value std::numeric_limits<T>::digits10 for integer types

Responsible-Changed-From-To: unassigned->paolo
Responsible-Changed-By: paolo
Responsible-Changed-When: Sat Dec  8 01:43:39 2001
Responsible-Changed-Why:
    Taking care of it.
State-Changed-From-To: open->feedback
State-Changed-By: paolo
State-Changed-When: Sat Dec  8 01:43:39 2001
State-Changed-Why:
    You are correct. Could you please check that the 
    following patch is ok?
    
      http://gcc.gnu.org/ml/libstdc++/2001-12/msg00123.html
    
    Thanks!
    Paolo.	

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=5045&database=gcc


^ permalink raw reply	[flat|nested] 5+ messages in thread

* libstdc++/5045: wrong value std::numeric_limits<T>::digits10 for integer types
@ 2001-12-07 12:06 pmartin
  0 siblings, 0 replies; 5+ messages in thread
From: pmartin @ 2001-12-07 12:06 UTC (permalink / raw)
  To: gcc-gnats


>Number:         5045
>Category:       libstdc++
>Synopsis:       wrong value std::numeric_limits<T>::digits10 for integer types
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Dec 07 12:06:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     pmartin@uklinux.net
>Release:        3.0.3 and 3.1
>Organization:
>Environment:
Reading specs from /usr/local/gcc-3.0-cvs/lib/gcc-lib/i686-pc-linux-gnu/3.0.3/sp
ecs
Configured with: /home/pm/sw/gcc-3.0-cvs/gcc/configure --prefix=/usr/local/gcc-3
.0-cvs --enable-languages=c++ --enable-threads
Thread model: posix
gcc version 3.0.3 20011030 (prerelease)


Reading specs from /usr/local/gcc-head/lib/gcc-lib/i686-pc-linux-gnu/3.1/specs
Configured with: /home/pm/sw/gcc-head/gcc/configure --prefix=/usr/local/gcc-head
 --enable-languages=c++ --enable-threads
Thread model: posix
gcc version 3.1 20011207 (experimental)
>Description:
The values of digits10 in bits/std_limits.h for most of the integer types
are out by one. For example the 8-bit signed value is

#define __glibcpp_s8_digits10 3

but only 2 decimal digits can be represented without change.

The values for signed and unsigned 8, 16 and 32 bits are all one
too large, as is signed 64 bits.  Note that unsigned 64 bits is 
OK, probably by accident, since 2^64 provides one more decimal 
than 2^63.

>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-12-13  0:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-12 16:16 libstdc++/5045: wrong value std::numeric_limits<T>::digits10 for integer types paolo
  -- strict thread matches above, loose matches on Subject: below --
2001-12-12 16:08 paolo
2001-12-08  1:46 paolo
2001-12-08  1:43 paolo
2001-12-07 12:06 pmartin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).