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.
This commit is contained in:
Patrick Palka 2021-02-24 17:31:04 -05:00
parent f207eed69e
commit cb0184b6a2

View file

@ -1151,7 +1151,7 @@ template<typename T>
// 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<T, long double>)
if constexpr (is_same_v<T, long double> || is_same_v<T, F128_type>)
{
int effective_precision;
const char* output_specifier;