public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely@redhat.com>
To: Patrick Palka <ppalka@redhat.com>
Cc: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org
Subject: Re: [PATCH] libstdc++: Fix __floating_to_chars_precision for __float128
Date: Wed, 24 Feb 2021 22:22:26 +0000	[thread overview]
Message-ID: <20210224222226.GC3008@redhat.com> (raw)
In-Reply-To: <20210224221455.3712422-1-ppalka@redhat.com>

On 24/02/21 17:14 -0500, Patrick Palka via Libstdc++ wrote:
>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 be updated accordingly.
>
>Tested on x86_64-pc-linux-gnu (i.e. it compiles :)), does this look OK
>for trunk?

Yes, Thanks.

>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.
>---
> 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;
>-- 
>2.30.1.602.g966e671106
>


      reply	other threads:[~2021-02-24 22:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-24 22:14 Patrick Palka
2021-02-24 22:22 ` Jonathan Wakely [this message]

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=20210224222226.GC3008@redhat.com \
    --to=jwakely@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.org \
    --cc=ppalka@redhat.com \
    /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: link
Be 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).