diff options
author | Patrick Palka <ppalka@redhat.com> | 2021-02-24 17:31:04 -0500 |
---|---|---|
committer | Patrick Palka <ppalka@redhat.com> | 2021-02-24 17:31:04 -0500 |
commit | cb0184b6a28c0ec7114f90e0df32b4897abee49f (patch) | |
tree | f2251e57678944802266552d08e728da0d840032 | |
parent | f207eed69e2421695e240aaf47bf881c09cbdd8a (diff) | |
download | gcc-cb0184b6a28c0ec7114f90e0df32b4897abee49f.zip gcc-cb0184b6a28c0ec7114f90e0df32b4897abee49f.tar.gz gcc-cb0184b6a28c0ec7114f90e0df32b4897abee49f.tar.bz2 |
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.
-rw-r--r-- | libstdc++-v3/src/c++17/floating_to_chars.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libstdc++-v3/src/c++17/floating_to_chars.cc b/libstdc++-v3/src/c++17/floating_to_chars.cc index aea96e0..f151201 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<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; |