public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "ppalka at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/104859] [12 regression] liibg++ fails during bootstrap Date: Wed, 09 Mar 2022 22:09:04 +0000 [thread overview] Message-ID: <bug-104859-4-MGDLgYUkLE@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-104859-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104859 Patrick Palka <ppalka at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |ppalka at gcc dot gnu.org Ever confirmed|0 |1 Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2022-03-09 --- Comment #5 from Patrick Palka <ppalka at gcc dot gnu.org> --- I think we just need to add some explicit casts: diff --git a/libstdc++-v3/src/c++17/floating_to_chars.cc b/libstdc++-v3/src/c++17/floating_to_chars.cc index 5825e661bf4..0ccf2623511 100644 --- a/libstdc++-v3/src/c++17/floating_to_chars.cc +++ b/libstdc++-v3/src/c++17/floating_to_chars.cc @@ -801,14 +801,14 @@ template<typename T> char leading_hexit; if constexpr (has_implicit_leading_bit) { - const unsigned nibble = effective_mantissa >> rounded_mantissa_bits; + const unsigned nibble = unsigned(effective_mantissa >> rounded_mantissa_bits); __glibcxx_assert(nibble <= 2); leading_hexit = '0' + nibble; effective_mantissa &= ~(mantissa_t{0b11} << rounded_mantissa_bits); } else { - const unsigned nibble = effective_mantissa >> (rounded_mantissa_bits-4); + const unsigned nibble = unsigned(effective_mantissa >> (rounded_mantissa_bits-4)); __glibcxx_assert(nibble < 16); leading_hexit = "0123456789abcdef"[nibble]; effective_mantissa &= ~(mantissa_t{0b1111} << (rounded_mantissa_bits-4)); @@ -853,7 +853,7 @@ template<typename T> while (effective_mantissa != 0) { nibble_offset -= 4; - const unsigned nibble = effective_mantissa >> nibble_offset; + const unsigned nibble = unsigned(effective_mantissa >> nibble_offset); __glibcxx_assert(nibble < 16); *first++ = "0123456789abcdef"[nibble]; ++written_hexits; since on targets which lack __int128, effective_mantissa can be the integer-class uint128_t, which unlike __int128 is only _explicitly_ convertible to the builtin integer types. And r12-7563-ge32869a17b788b made us correctly exclude explicit conversion operators during copy-initialization.
next prev parent reply other threads:[~2022-03-09 22:09 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-03-09 19:18 [Bug libgcc/104859] New: " seurer at gcc dot gnu.org 2022-03-09 21:31 ` [Bug libgcc/104859] " seurer at gcc dot gnu.org 2022-03-09 21:38 ` [Bug c++/104859] " pinskia at gcc dot gnu.org 2022-03-09 21:42 ` seurer at gcc dot gnu.org 2022-03-09 21:45 ` pinskia at gcc dot gnu.org 2022-03-09 22:09 ` ppalka at gcc dot gnu.org [this message] 2022-03-09 22:10 ` jakub at gcc dot gnu.org 2022-03-09 22:12 ` jakub at gcc dot gnu.org 2022-03-09 23:49 ` [Bug libstdc++/104859] " cvs-commit at gcc dot gnu.org 2022-03-10 0:04 ` ppalka at gcc dot gnu.org 2022-03-10 8:41 ` [Bug libstdc++/104859] [11 Regression] libg++ " rguenth at gcc dot gnu.org 2022-04-07 10:13 ` rguenth at gcc dot gnu.org 2022-04-07 15:41 ` redi at gcc dot gnu.org 2022-04-07 19:36 ` cvs-commit at gcc dot gnu.org 2022-04-07 19:38 ` ppalka at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-104859-4-MGDLgYUkLE@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).