public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/20909] New: incorrect floating point format
@ 2005-04-08 19:40 cpp at tempest-sw dot com
  2005-04-08 21:01 ` [Bug libstdc++/20909] " pcarlini at suse dot de
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: cpp at tempest-sw dot com @ 2005-04-08 19:40 UTC (permalink / raw)
  To: gcc-bugs

In some locales, certain floating point numbers are printed incorrectly. (I
think the problem lies with numbers with one significant digits, in scientific
format, with a thousands separator and thousands grouping.)

For example:

#include <iostream>
#include <locale>
#include <ostream>

int main()
{
  std::wcout.imbue(std::locale("en_US"));
  std::wcout << 2e10 << '\n';
}

Prints "2e,+10".

-- 
           Summary: incorrect floating point format
           Product: gcc
           Version: 3.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: cpp at tempest-sw dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20909


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

* [Bug libstdc++/20909] incorrect floating point format
  2005-04-08 19:40 [Bug libstdc++/20909] New: incorrect floating point format cpp at tempest-sw dot com
@ 2005-04-08 21:01 ` pcarlini at suse dot de
  2005-04-09  0:09 ` cvs-commit at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pcarlini at suse dot de @ 2005-04-08 21:01 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pcarlini at suse dot de  2005-04-08 21:00 -------
Yes, this is actually a very long standing bug, which we hoped didn't trigger
in common situations (because the fix probably is rather ugly :(
Ok, let's finally work on it. Thanks for your report.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pcarlini at suse dot de
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-04-08 21:00:56
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20909


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

* [Bug libstdc++/20909] incorrect floating point format
  2005-04-08 19:40 [Bug libstdc++/20909] New: incorrect floating point format cpp at tempest-sw dot com
  2005-04-08 21:01 ` [Bug libstdc++/20909] " pcarlini at suse dot de
@ 2005-04-09  0:09 ` cvs-commit at gcc dot gnu dot org
  2005-04-09  0:15 ` cvs-commit at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-04-09  0:09 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-04-09 00:09 -------
Subject: Bug 20909

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	paolo@gcc.gnu.org	2005-04-09 00:08:59

Modified files:
	libstdc++-v3   : ChangeLog 
	libstdc++-v3/include/bits: locale_facets.tcc 
Added files:
	libstdc++-v3/testsuite/22_locale/num_put/put/char: 20909.cc 
	libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t: 20909.cc 

Log message:
	2005-04-08  Paolo Carlini  <pcarlini@suse.de>
	
	PR libstdc++/20909
	* include/bits/locale_facets.tcc (num_put<>::_M_insert_float):
	Don't even try to group numbers like 2e20, i.e., no decimal
	point, scientific notation.
	* testsuite/22_locale/num_put/put/char/20909.cc: New.
	* testsuite/22_locale/num_put/put/wchar_t/20909.cc: Likewise.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&r1=1.2968&r2=1.2969
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/locale_facets.tcc.diff?cvsroot=gcc&r1=1.211&r2=1.212
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/22_locale/num_put/put/char/20909.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/20909.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20909


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

* [Bug libstdc++/20909] incorrect floating point format
  2005-04-08 19:40 [Bug libstdc++/20909] New: incorrect floating point format cpp at tempest-sw dot com
  2005-04-08 21:01 ` [Bug libstdc++/20909] " pcarlini at suse dot de
  2005-04-09  0:09 ` cvs-commit at gcc dot gnu dot org
@ 2005-04-09  0:15 ` cvs-commit at gcc dot gnu dot org
  2005-04-09  0:31 ` pcarlini at suse dot de
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-04-09  0:15 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-04-09 00:15 -------
Subject: Bug 20909

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	paolo@gcc.gnu.org	2005-04-09 00:14:59

Modified files:
	libstdc++-v3   : ChangeLog 
	libstdc++-v3/include/bits: locale_facets.tcc 
Added files:
	libstdc++-v3/testsuite/22_locale/num_put/put/char: 20909.cc 
	libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t: 20909.cc 

Log message:
	2005-04-08  Paolo Carlini  <pcarlini@suse.de>
	
	PR libstdc++/20909
	* include/bits/locale_facets.tcc (num_put<>::_M_insert_float):
	Don't even try to group numbers like 2e20, i.e., no decimal
	point, scientific notation.
	* testsuite/22_locale/num_put/put/char/20909.cc: New.
	* testsuite/22_locale/num_put/put/wchar_t/20909.cc: Likewise.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.2917.2.21&r2=1.2917.2.22
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/locale_facets.tcc.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.211&r2=1.211.12.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/22_locale/num_put/put/char/20909.cc.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/20909.cc.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20909


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

* [Bug libstdc++/20909] incorrect floating point format
  2005-04-08 19:40 [Bug libstdc++/20909] New: incorrect floating point format cpp at tempest-sw dot com
                   ` (2 preceding siblings ...)
  2005-04-09  0:15 ` cvs-commit at gcc dot gnu dot org
@ 2005-04-09  0:31 ` pcarlini at suse dot de
  2005-04-21  5:03 ` mmitchel at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pcarlini at suse dot de @ 2005-04-09  0:31 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.0.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20909


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

* [Bug libstdc++/20909] incorrect floating point format
  2005-04-08 19:40 [Bug libstdc++/20909] New: incorrect floating point format cpp at tempest-sw dot com
                   ` (3 preceding siblings ...)
  2005-04-09  0:31 ` pcarlini at suse dot de
@ 2005-04-21  5:03 ` mmitchel at gcc dot gnu dot org
  2005-04-25  9:53 ` pcarlini at suse dot de
  2005-04-25  9:53 ` pcarlini at suse dot de
  6 siblings, 0 replies; 8+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-04-21  5:03 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.0.0                       |4.0.1


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20909


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

* [Bug libstdc++/20909] incorrect floating point format
  2005-04-08 19:40 [Bug libstdc++/20909] New: incorrect floating point format cpp at tempest-sw dot com
                   ` (5 preceding siblings ...)
  2005-04-25  9:53 ` pcarlini at suse dot de
@ 2005-04-25  9:53 ` pcarlini at suse dot de
  6 siblings, 0 replies; 8+ messages in thread
From: pcarlini at suse dot de @ 2005-04-25  9:53 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pcarlini at suse dot de  2005-04-25 09:52 -------
.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20909


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

* [Bug libstdc++/20909] incorrect floating point format
  2005-04-08 19:40 [Bug libstdc++/20909] New: incorrect floating point format cpp at tempest-sw dot com
                   ` (4 preceding siblings ...)
  2005-04-21  5:03 ` mmitchel at gcc dot gnu dot org
@ 2005-04-25  9:53 ` pcarlini at suse dot de
  2005-04-25  9:53 ` pcarlini at suse dot de
  6 siblings, 0 replies; 8+ messages in thread
From: pcarlini at suse dot de @ 2005-04-25  9:53 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pcarlini at suse dot de  2005-04-25 09:51 -------
Fixed for 4.0.0.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.0.1                       |4.0.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20909


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

end of thread, other threads:[~2005-04-25  9:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-08 19:40 [Bug libstdc++/20909] New: incorrect floating point format cpp at tempest-sw dot com
2005-04-08 21:01 ` [Bug libstdc++/20909] " pcarlini at suse dot de
2005-04-09  0:09 ` cvs-commit at gcc dot gnu dot org
2005-04-09  0:15 ` cvs-commit at gcc dot gnu dot org
2005-04-09  0:31 ` pcarlini at suse dot de
2005-04-21  5:03 ` mmitchel at gcc dot gnu dot org
2005-04-25  9:53 ` pcarlini at suse dot de
2005-04-25  9:53 ` pcarlini at suse dot de

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