public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely@redhat.com>
To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org
Cc: hp@gcc.gnu.org, ppalka@redhat.com
Subject: [committed 1/2] libstdc++: Fix deduction failure for std::min call [PR104080]
Date: Tue, 18 Jan 2022 10:12:19 +0000	[thread overview]
Message-ID: <20220118101220.3578219-1-jwakely@redhat.com> (raw)

Tested x86_64-linux, pushed to trunk.
Reported upstream as https://github.com/fastfloat/fast_float/pull/122


libstdc++-v3/ChangeLog:

	PR libstdc++/104080
	* src/c++17/fast_float/LOCAL_PATCHES: UPDATE.
	* src/c++17/fast_float/fast_float.h (round): Use explicit
	template argument list for std::min.
---
 libstdc++-v3/src/c++17/fast_float/LOCAL_PATCHES | 1 +
 libstdc++-v3/src/c++17/fast_float/fast_float.h  | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/libstdc++-v3/src/c++17/fast_float/LOCAL_PATCHES b/libstdc++-v3/src/c++17/fast_float/LOCAL_PATCHES
index 71495d6728b..447c7ed2cdb 100644
--- a/libstdc++-v3/src/c++17/fast_float/LOCAL_PATCHES
+++ b/libstdc++-v3/src/c++17/fast_float/LOCAL_PATCHES
@@ -1,2 +1,3 @@
 r12-6647
 r12-6648
+r12-6664
diff --git a/libstdc++-v3/src/c++17/fast_float/fast_float.h b/libstdc++-v3/src/c++17/fast_float/fast_float.h
index 97d28940944..ee129309ba3 100644
--- a/libstdc++-v3/src/c++17/fast_float/fast_float.h
+++ b/libstdc++-v3/src/c++17/fast_float/fast_float.h
@@ -2466,7 +2466,7 @@ fastfloat_really_inline void round(adjusted_mantissa& am, callback cb) noexcept
   if (-am.power2 >= mantissa_shift) {
     // have a denormal float
     int32_t shift = -am.power2 + 1;
-    cb(am, std::min(shift, 64));
+    cb(am, std::min<int32_t>(shift, 64));
     // check for round-up: if rounding-nearest carried us to the hidden bit.
     am.power2 = (am.mantissa < (uint64_t(1) << binary_format<T>::mantissa_explicit_bits())) ? 0 : 1;
     return;
-- 
2.31.1


             reply	other threads:[~2022-01-18 10:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-18 10:12 Jonathan Wakely [this message]
2022-01-18 10:12 ` [committed 2/2] libstdc++: Use GCC's predefined macro for endianness [PR104080] Jonathan Wakely
2022-01-18 19:44   ` Patrick Palka
2022-01-18 20:01     ` Patrick Palka
2022-01-18 20:51       ` Jonathan Wakely
2022-01-18 20:10     ` Jakub Jelinek

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=20220118101220.3578219-1-jwakely@redhat.com \
    --to=jwakely@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hp@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.org \
    --cc=ppalka@redhat.com \
    /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: link
Be 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).