public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-7378] libstdc++: Fix __floating_to_chars_precision for __float128
@ 2021-02-24 22:31 Patrick Palka
  0 siblings, 0 replies; only message in thread
From: Patrick Palka @ 2021-02-24 22:31 UTC (permalink / raw)
  To: gcc-cvs, libstdc++-cvs

https://gcc.gnu.org/g:cb0184b6a28c0ec7114f90e0df32b4897abee49f

commit r11-7378-gcb0184b6a28c0ec7114f90e0df32b4897abee49f
Author: Patrick Palka <ppalka@redhat.com>
Date:   Wed Feb 24 17:31:04 2021 -0500

    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:
---
 libstdc++-v3/src/c++17/floating_to_chars.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libstdc++-v3/src/c++17/floating_to_chars.cc b/libstdc++-v3/src/c++17/floating_to_chars.cc
index aea96e08df1..f1512017aa3 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;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-02-24 22:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-24 22:31 [gcc r11-7378] libstdc++: Fix __floating_to_chars_precision for __float128 Patrick Palka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).