public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/81122] [DR 2381] parsing f stopped after '0' when reading std::hexfloat >> f;
[not found] <bug-81122-4@http.gcc.gnu.org/bugzilla/>
@ 2020-06-12 11:39 ` pbristow at hetp dot u-net.com
2020-06-12 12:48 ` maxim.yegorushkin at gmail dot com
` (7 subsequent siblings)
8 siblings, 0 replies; 9+ messages in thread
From: pbristow at hetp dot u-net.com @ 2020-06-12 11:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81122
Paul A. Bristow <pbristow at hetp dot u-net.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pbristow at hetp dot u-net.com
--- Comment #18 from Paul A. Bristow <pbristow at hetp dot u-net.com> ---
Working on test for Boost.Multiprecision UDTs, I have just stumbled on this,
expecting loopback to 'just work' as it does on Clang libc++ and MSVC.
LWG 2381 is still (currently open) and seems to have stalled?
Is there any way to get this resolved for GCC libstd++?
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/81122] [DR 2381] parsing f stopped after '0' when reading std::hexfloat >> f;
[not found] <bug-81122-4@http.gcc.gnu.org/bugzilla/>
2020-06-12 11:39 ` [Bug libstdc++/81122] [DR 2381] parsing f stopped after '0' when reading std::hexfloat >> f; pbristow at hetp dot u-net.com
@ 2020-06-12 12:48 ` maxim.yegorushkin at gmail dot com
2020-06-12 13:43 ` redi at gcc dot gnu.org
` (6 subsequent siblings)
8 siblings, 0 replies; 9+ messages in thread
From: maxim.yegorushkin at gmail dot com @ 2020-06-12 12:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81122
--- Comment #19 from Maxim Egorushkin <maxim.yegorushkin at gmail dot com> ---
(In reply to Jonathan Wakely from comment #17)
> At this time LWG 2381 is still open. Until the proposed fix (or some other
> fix) is resolved by making a change to the draft standard, I do not want to
> change libstdc++.
May be enable hexfloat round-trip if a user defines a macro?
The standards often follow existing practice, waiting on the standard may lead
to a deadlock.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/81122] [DR 2381] parsing f stopped after '0' when reading std::hexfloat >> f;
[not found] <bug-81122-4@http.gcc.gnu.org/bugzilla/>
2020-06-12 11:39 ` [Bug libstdc++/81122] [DR 2381] parsing f stopped after '0' when reading std::hexfloat >> f; pbristow at hetp dot u-net.com
2020-06-12 12:48 ` maxim.yegorushkin at gmail dot com
@ 2020-06-12 13:43 ` redi at gcc dot gnu.org
2020-06-28 12:11 ` pbristow at hetp dot u-net.com
` (5 subsequent siblings)
8 siblings, 0 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2020-06-12 13:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81122
--- Comment #20 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I'll ask the new LWG chair to bump the issue.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/81122] [DR 2381] parsing f stopped after '0' when reading std::hexfloat >> f;
[not found] <bug-81122-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2020-06-12 13:43 ` redi at gcc dot gnu.org
@ 2020-06-28 12:11 ` pbristow at hetp dot u-net.com
2022-04-13 11:20 ` dvirtz at gmail dot com
` (4 subsequent siblings)
8 siblings, 0 replies; 9+ messages in thread
From: pbristow at hetp dot u-net.com @ 2020-06-28 12:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81122
--- Comment #21 from Paul A. Bristow <pbristow at hetp dot u-net.com> ---
I also note that
https://en.cppreference.com/w/cpp/io/manip/fixed
Notes
Hexadecimal floating-point formatting ignores the stream precision
specification,
as required by the specification of std::num_put::do_put.
https://en.cppreference.com/w/cpp/locale/num_put/put
Additionally, if floatfield != (ios_base::fixed | ios_base::scientific),
then (since C++11) precision modifier is added, set to str.precision()
"When formatting a floating point value as hexfloat (i.e., when floatfield ==
(std::ios_base::fixed | std::ios_base::scientific)), the stream's precision is
not used; instead, the number is always printed with enough precision to
exactly represent the value." (since C++11)
but this is not what MSVC currently 16.7.0.Preview 3 is implementing as noted
https://developercommunity.visualstudio.com/content/problem/520472/hexfloat-stream-output-does-not-ignore-precision-a.html
*It would be extremely unfortunate if various compilers implemented this
differently.*
I see no case for precision to change the output from std::hexfloat because it
specifies a *decimal* precision, not a hexadecimal one. std::hexfloat output
should always be enough precision to *exactly represent the value*, however
large.
It would be nice if std::showpoint could also respect output of trailing zeros,
so that the default std::showpoint output displays neat columns, and that
std::noshowpoint made output with minimum size (for example, minimizing
serialized data).
(In passing, I note that std::scientific always includes (often many) trailing
zeros, ignoring showpoint. Changing this would be logical but a breaking
change.)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/81122] [DR 2381] parsing f stopped after '0' when reading std::hexfloat >> f;
[not found] <bug-81122-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2020-06-28 12:11 ` pbristow at hetp dot u-net.com
@ 2022-04-13 11:20 ` dvirtz at gmail dot com
2022-04-13 11:29 ` redi at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 9+ messages in thread
From: dvirtz at gmail dot com @ 2022-04-13 11:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81122
Dvir Yitzchaki <dvirtz at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dvirtz at gmail dot com
--- Comment #22 from Dvir Yitzchaki <dvirtz at gmail dot com> ---
any update on this now that CWG 2381 has been approved?
source: https://wg21.link/lwg2381
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/81122] [DR 2381] parsing f stopped after '0' when reading std::hexfloat >> f;
[not found] <bug-81122-4@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2022-04-13 11:20 ` dvirtz at gmail dot com
@ 2022-04-13 11:29 ` redi at gcc dot gnu.org
2022-11-24 9:47 ` redi at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2022-04-13 11:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81122
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|SUSPENDED |NEW
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/81122] [DR 2381] parsing f stopped after '0' when reading std::hexfloat >> f;
[not found] <bug-81122-4@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2022-04-13 11:29 ` redi at gcc dot gnu.org
@ 2022-11-24 9:47 ` redi at gcc dot gnu.org
2023-04-26 6:55 ` rguenth at gcc dot gnu.org
2023-07-27 9:22 ` rguenth at gcc dot gnu.org
8 siblings, 0 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2022-11-24 9:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81122
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org
Target Milestone|--- |13.0
Status|NEW |ASSIGNED
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/81122] [DR 2381] parsing f stopped after '0' when reading std::hexfloat >> f;
[not found] <bug-81122-4@http.gcc.gnu.org/bugzilla/>
` (6 preceding siblings ...)
2022-11-24 9:47 ` redi at gcc dot gnu.org
@ 2023-04-26 6:55 ` rguenth at gcc dot gnu.org
2023-07-27 9:22 ` rguenth at gcc dot gnu.org
8 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-04-26 6:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81122
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|13.0 |13.2
--- Comment #23 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 13.1 is being released, retargeting bugs to GCC 13.2.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/81122] [DR 2381] parsing f stopped after '0' when reading std::hexfloat >> f;
[not found] <bug-81122-4@http.gcc.gnu.org/bugzilla/>
` (7 preceding siblings ...)
2023-04-26 6:55 ` rguenth at gcc dot gnu.org
@ 2023-07-27 9:22 ` rguenth at gcc dot gnu.org
8 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-27 9:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81122
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|13.2 |13.3
--- Comment #24 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 13.2 is being released, retargeting bugs to GCC 13.3.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2023-07-27 9:22 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-81122-4@http.gcc.gnu.org/bugzilla/>
2020-06-12 11:39 ` [Bug libstdc++/81122] [DR 2381] parsing f stopped after '0' when reading std::hexfloat >> f; pbristow at hetp dot u-net.com
2020-06-12 12:48 ` maxim.yegorushkin at gmail dot com
2020-06-12 13:43 ` redi at gcc dot gnu.org
2020-06-28 12:11 ` pbristow at hetp dot u-net.com
2022-04-13 11:20 ` dvirtz at gmail dot com
2022-04-13 11:29 ` redi at gcc dot gnu.org
2022-11-24 9:47 ` redi at gcc dot gnu.org
2023-04-26 6:55 ` rguenth at gcc dot gnu.org
2023-07-27 9:22 ` rguenth 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).