public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/107799] New: Wrong return type for std::bit_width
@ 2022-11-21 23:26 diego at baldassar dot net
2022-11-22 0:51 ` [Bug libstdc++/107799] " redi at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: diego at baldassar dot net @ 2022-11-21 23:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107799
Bug ID: 107799
Summary: Wrong return type for std::bit_width
Product: gcc
Version: 12.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: diego at baldassar dot net
Target Milestone: ---
According to the C++20 standard, std::bit_width returns an int; in libstdc++ it
returns the same type as the argument.
The return type should probably be _If_is_unsigned_integer<_Tp, int> instead of
_If_is_unsigned_integer<_Tp>.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libstdc++/107799] Wrong return type for std::bit_width
2022-11-21 23:26 [Bug libstdc++/107799] New: Wrong return type for std::bit_width diego at baldassar dot net
@ 2022-11-22 0:51 ` redi at gcc dot gnu.org
2022-11-22 13:25 ` diego at baldassar dot net
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: redi at gcc dot gnu.org @ 2022-11-22 0:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107799
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Last reconfirmed| |2022-11-22
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
No, according to the published C++20 standard it returns the same type as the
argument.
That was changed in July 2022 by https://cplusplus.github.io/LWG/issue3656 and
libstdc++ doesn't implement that change yet.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libstdc++/107799] Wrong return type for std::bit_width
2022-11-21 23:26 [Bug libstdc++/107799] New: Wrong return type for std::bit_width diego at baldassar dot net
2022-11-22 0:51 ` [Bug libstdc++/107799] " redi at gcc dot gnu.org
@ 2022-11-22 13:25 ` diego at baldassar dot net
2022-11-22 17:21 ` redi at gcc dot gnu.org
2023-01-06 12:11 ` redi at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: diego at baldassar dot net @ 2022-11-22 13:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107799
--- Comment #2 from Diego Baldassar <diego at baldassar dot net> ---
Ah I see, it was a DR. My mistake.
Will we see this updated for GCC 13? Or is it considered a breaking change
that's too late to fix?
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libstdc++/107799] Wrong return type for std::bit_width
2022-11-21 23:26 [Bug libstdc++/107799] New: Wrong return type for std::bit_width diego at baldassar dot net
2022-11-22 0:51 ` [Bug libstdc++/107799] " redi at gcc dot gnu.org
2022-11-22 13:25 ` diego at baldassar dot net
@ 2022-11-22 17:21 ` redi at gcc dot gnu.org
2023-01-06 12:11 ` redi at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: redi at gcc dot gnu.org @ 2022-11-22 17:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107799
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
It will get updated.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libstdc++/107799] Wrong return type for std::bit_width
2022-11-21 23:26 [Bug libstdc++/107799] New: Wrong return type for std::bit_width diego at baldassar dot net
` (2 preceding siblings ...)
2022-11-22 17:21 ` redi at gcc dot gnu.org
@ 2023-01-06 12:11 ` redi at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: redi at gcc dot gnu.org @ 2023-01-06 12:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107799
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
Target Milestone|--- |13.0
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Done in r13-4293-g4581328022615c
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-01-06 12:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-21 23:26 [Bug libstdc++/107799] New: Wrong return type for std::bit_width diego at baldassar dot net
2022-11-22 0:51 ` [Bug libstdc++/107799] " redi at gcc dot gnu.org
2022-11-22 13:25 ` diego at baldassar dot net
2022-11-22 17:21 ` redi at gcc dot gnu.org
2023-01-06 12:11 ` 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).