public inbox for libstdc++-cvs@sourceware.org help / color / mirror / Atom feed
From: Patrick Palka <ppalka@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r11-7378] libstdc++: Fix __floating_to_chars_precision for __float128 Date: Wed, 24 Feb 2021 22:31:34 +0000 (GMT) [thread overview] Message-ID: <20210224223134.964B53850438@sourceware.org> (raw) 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;
reply other threads:[~2021-02-24 22:31 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210224223134.964B53850438@sourceware.org \ --to=ppalka@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ --cc=libstdc++-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).