public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/110355] New: std::format("{}", 1e-7) returns "1e-07" instead of "1e-7"
@ 2023-06-21 17:26 redi at gcc dot gnu.org
  2023-06-21 17:26 ` [Bug libstdc++/110355] " redi at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2023-06-21 17:26 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110355

            Bug ID: 110355
           Summary: std::format("{}", 1e-7) returns "1e-07" instead of
                    "1e-7"
           Product: gcc
           Version: 13.1.1
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: redi at gcc dot gnu.org
            Blocks: 110354
  Target Milestone: ---


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110354
[Bug 110354] [C++26] P2587R3 to_string or not to_string

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

* [Bug libstdc++/110355] std::format("{}", 1e-7) returns "1e-07" instead of "1e-7"
  2023-06-21 17:26 [Bug libstdc++/110355] New: std::format("{}", 1e-7) returns "1e-07" instead of "1e-7" redi at gcc dot gnu.org
@ 2023-06-21 17:26 ` redi at gcc dot gnu.org
  2023-06-30 17:15 ` redi at gcc dot gnu.org
  2023-07-10 14:44 ` redi at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2023-06-21 17:26 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110355

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2023-06-21
           Assignee|unassigned at gcc dot gnu.org      |redi at gcc dot gnu.org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever confirmed|0                           |1

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
mine

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

* [Bug libstdc++/110355] std::format("{}", 1e-7) returns "1e-07" instead of "1e-7"
  2023-06-21 17:26 [Bug libstdc++/110355] New: std::format("{}", 1e-7) returns "1e-07" instead of "1e-7" redi at gcc dot gnu.org
  2023-06-21 17:26 ` [Bug libstdc++/110355] " redi at gcc dot gnu.org
@ 2023-06-30 17:15 ` redi at gcc dot gnu.org
  2023-07-10 14:44 ` redi at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2023-06-30 17:15 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110355

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ppalka at gcc dot gnu.org

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Oh this is actually std::to_chars not std::format

#include <charconv>

int main()
{
  char buf[5];
  std::to_chars(buf, buf+5, 1e-7);
  if (__builtin_memcmp(buf, "1e-7", 4))
    __builtin_abort();
}

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

* [Bug libstdc++/110355] std::format("{}", 1e-7) returns "1e-07" instead of "1e-7"
  2023-06-21 17:26 [Bug libstdc++/110355] New: std::format("{}", 1e-7) returns "1e-07" instead of "1e-7" redi at gcc dot gnu.org
  2023-06-21 17:26 ` [Bug libstdc++/110355] " redi at gcc dot gnu.org
  2023-06-30 17:15 ` redi at gcc dot gnu.org
@ 2023-07-10 14:44 ` redi at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2023-07-10 14:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110355

Jonathan Wakely <redi at gcc dot gnu.org> changed:

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

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Libstdc++ is correct, the example in https://wg21.link/p2587r3 is wrong.

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

end of thread, other threads:[~2023-07-10 14:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-21 17:26 [Bug libstdc++/110355] New: std::format("{}", 1e-7) returns "1e-07" instead of "1e-7" redi at gcc dot gnu.org
2023-06-21 17:26 ` [Bug libstdc++/110355] " redi at gcc dot gnu.org
2023-06-30 17:15 ` redi at gcc dot gnu.org
2023-07-10 14:44 ` redi at gcc dot gnu.org

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