From: Patrick Palka Date: Wed, 24 Feb 2021 22:31:04 +0000 (-0500) Subject: libstdc++: Fix __floating_to_chars_precision for __float128 X-Git-Tag: basepoints/gcc-12~879 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cb0184b6a28c0ec7114f90e0df32b4897abee49f;p=thirdparty%2Fgcc.git libstdc++: Fix __floating_to_chars_precision for __float128 The code path in __floating_to_chars_precision for handling long double by going through printf now also handles __float128, so the condition that guards this code path needs to get updated accordingly. libstdc++-v3/ChangeLog: * src/c++17/floating_to_chars.cc (__floating_to_chars_precision): Relax the condition that guards the printf code path to accept F128_type as well as long double. --- diff --git a/libstdc++-v3/src/c++17/floating_to_chars.cc b/libstdc++-v3/src/c++17/floating_to_chars.cc index aea96e08df18..f1512017aa3c 100644 --- a/libstdc++-v3/src/c++17/floating_to_chars.cc +++ b/libstdc++-v3/src/c++17/floating_to_chars.cc @@ -1151,7 +1151,7 @@ template // Ryu doesn't support formatting floating-point types larger than double // with an explicit precision, so instead we just go through printf. - if constexpr (is_same_v) + if constexpr (is_same_v || is_same_v) { int effective_precision; const char* output_specifier;