]> gcc.gnu.org Git - gcc.git/commitdiff
libstdc++: Fix build for targets without _Float128 [PR109921]
authorJonathan Wakely <jwakely@redhat.com>
Wed, 31 May 2023 17:01:13 +0000 (18:01 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Wed, 31 May 2023 19:57:31 +0000 (20:57 +0100)
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.

libstdc++-v3/src/c++17/floating_from_chars.cc

index eea878072b07c957a2153e34962e43085db018db..f1dd1037bf3e8c0141a195b0bf442ac92447ee54 100644 (file)
@@ -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
This page took 0.063385 seconds and 5 git commands to generate.