public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: libstdc++/6268: _M_extract_buffer_length = 32 for double do_get
@ 2002-04-15 16:48 bkoz
  0 siblings, 0 replies; 3+ messages in thread
From: bkoz @ 2002-04-15 16:48 UTC (permalink / raw)
  To: bkoz, gcc-bugs, gcc-prs, kenta

Synopsis: _M_extract_buffer_length = 32 for double do_get

State-Changed-From-To: feedback->closed
State-Changed-By: bkoz
State-Changed-When: Mon Apr 15 16:48:53 2002
State-Changed-Why:
    This:
    
    #include <iostream>
    
    int main()
    {
      using namespace std;
      double x; 
      cin >> x;
      cout << x << endl;
      return 0;
    }
    
    Gives:
    
    %a.out 
    0.12345678901234567890123456789012345678901234567890
    0.123457
    
    Fixed.
    
    -benjamin

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


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

* Re: libstdc++/6268: _M_extract_buffer_length = 32 for double do_get
@ 2002-04-11 23:40 bkoz
  0 siblings, 0 replies; 3+ messages in thread
From: bkoz @ 2002-04-11 23:40 UTC (permalink / raw)
  To: bkoz, gcc-bugs, gcc-prs, kenta, nobody

Synopsis: _M_extract_buffer_length = 32 for double do_get

Responsible-Changed-From-To: unassigned->bkoz
Responsible-Changed-By: bkoz
Responsible-Changed-When: Thu Apr 11 23:39:50 2002
Responsible-Changed-Why:
    Mine.
State-Changed-From-To: open->feedback
State-Changed-By: bkoz
State-Changed-When: Thu Apr 11 23:39:50 2002
State-Changed-Why:
    This has been fixed in 3.1 sources. Please check them out.
    
    -benjamin

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


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

* libstdc++/6268: _M_extract_buffer_length = 32 for double do_get
@ 2002-04-11 20:26 kenta
  0 siblings, 0 replies; 3+ messages in thread
From: kenta @ 2002-04-11 20:26 UTC (permalink / raw)
  To: gcc-gnats


>Number:         6268
>Category:       libstdc++
>Synopsis:       _M_extract_buffer_length = 32 for double do_get
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Apr 11 20:26:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     kenta@mit.edu
>Release:        3.0.4
>Organization:
>Environment:
i386 Linux (and others probably)
>Description:
In the "double" overloaded version of do_get()  (buried inside
i686-pc-linux-gnu/libstdc++-v3/include/bits/locale_facets.tcc), the comment
makes reference to "the size of 256" (line 595 for 3.0.3), but
the array __xtrc is declared to be of length 32 (i.e.,
_M_extract_buffer_length).  This is probably a bug.

As far as I can tell, this is what causes failure for
this simple code "double x; cin >> x" and I input

0.12345678901234567890123456789012345678901234567890

Anything more than 30 digits past the decimal point breaks.
I want it to gracefully round or truncate.







>How-To-Repeat:

>Fix:
Don't ever input more than 30 digits past the decimal point.
>Release-Note:
>Audit-Trail:
>Unformatted:


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

end of thread, other threads:[~2002-04-15 23:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-15 16:48 libstdc++/6268: _M_extract_buffer_length = 32 for double do_get bkoz
  -- strict thread matches above, loose matches on Subject: below --
2002-04-11 23:40 bkoz
2002-04-11 20:26 kenta

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).