From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 11E863858000; Wed, 31 May 2023 19:57:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 11E863858000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685563076; bh=KD4zdX939RhuUe6pqNDvIon/3bmXOlSuiJt2TCZ4bn4=; h=From:To:Subject:Date:From; b=bX0MIBo+K8ZWMTZkP2PJvogFqGZhwjjhaPm5rRTlKuda4KFWoWwcfcBfBaNsIPb/J GoMUnxigUQKybhh+hFY+bl/ZX6qGO5V9FN4eORTaS5EmQAdtQxPtYuls62fQrPosK0 aWq/zBZzLFgLafeVo2MUIV5Z25T8XfBrVND6o/Do= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r14-1451] libstdc++: Fix build for targets without _Float128 [PR109921] X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/master X-Git-Oldrev: 2a919c08abb2cc5aeb31abb400b3489f67467dbf X-Git-Newrev: a239a35075ffd8b34f1db72c22998a625ff962b5 Message-Id: <20230531195756.11E863858000@sourceware.org> Date: Wed, 31 May 2023 19:57:56 +0000 (GMT) List-Id: https://gcc.gnu.org/g:a239a35075ffd8b34f1db72c22998a625ff962b5 commit r14-1451-ga239a35075ffd8b34f1db72c22998a625ff962b5 Author: Jonathan Wakely Date: Wed May 31 18:01:13 2023 +0100 libstdc++: Fix build for targets without _Float128 [PR109921] My r14-1431-g7037e7b6e4ac41 change caused the _Float128 overload to be compiled unconditionally, by moving the USE_STRTOF128_FOR_FROM_CHARS check into the function body. That function should still only be compiled if the target actually supports _Float128. libstdc++-v3/ChangeLog: PR libstdc++/109921 * src/c++17/floating_from_chars.cc: Check __FLT128_MANT_DIG__ is defined before trying to use _Float128. Diff: --- libstdc++-v3/src/c++17/floating_from_chars.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libstdc++-v3/src/c++17/floating_from_chars.cc b/libstdc++-v3/src/c++17/floating_from_chars.cc index eea878072b0..f1dd1037bf3 100644 --- a/libstdc++-v3/src/c++17/floating_from_chars.cc +++ b/libstdc++-v3/src/c++17/floating_from_chars.cc @@ -1325,7 +1325,7 @@ _ZSt10from_charsPKcS0_RDF128_St12chars_format(const char* first, __ieee128& value, chars_format fmt) noexcept __attribute__((alias ("_ZSt10from_charsPKcS0_Ru9__ieee128St12chars_format"))); -#else +#elif defined(__FLT128_MANT_DIG__) from_chars_result from_chars(const char* first, const char* last, _Float128& value, chars_format fmt) noexcept