From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id CF0F139540E7 for ; Wed, 24 Feb 2021 22:22:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org CF0F139540E7 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-261-WW3xrboUNouEV6hE4QARKQ-1; Wed, 24 Feb 2021 17:22:28 -0500 X-MC-Unique: WW3xrboUNouEV6hE4QARKQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 82DE418C35BA; Wed, 24 Feb 2021 22:22:27 +0000 (UTC) Received: from localhost (unknown [10.33.36.11]) by smtp.corp.redhat.com (Postfix) with ESMTP id 19C0A19CBD; Wed, 24 Feb 2021 22:22:26 +0000 (UTC) Date: Wed, 24 Feb 2021 22:22:26 +0000 From: Jonathan Wakely To: Patrick Palka Cc: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org Subject: Re: [PATCH] libstdc++: Fix __floating_to_chars_precision for __float128 Message-ID: <20210224222226.GC3008@redhat.com> References: <20210224221455.3712422-1-ppalka@redhat.com> MIME-Version: 1.0 In-Reply-To: <20210224221455.3712422-1-ppalka@redhat.com> X-Clacks-Overhead: GNU Terry Pratchett X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline X-Spam-Status: No, score=-14.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Feb 2021 22:22:32 -0000 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 > > // 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) >+ if constexpr (is_same_v || is_same_v) > { > int effective_precision; > const char* output_specifier; >-- >2.30.1.602.g966e671106 >