Message ID | ory1zjfa60.fsf@lxoliva.fsfla.org |
---|---|
State | Committed |
Headers |
Return-Path: <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 63E2D385735A for <patchwork@sourceware.org>; Tue, 3 May 2022 05:38:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 63E2D385735A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1651556334; bh=CO7UeuZS/0Fp1/MHYagr8dnfvvyeTMVCdvd22I4rSQk=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=kufBCXNOM7ghogCMSgEQX3rKgCFet0AohjVa/mEfUmTEgx/Nse+6hkFPRMtf2xjwi xCi8j/d+2CcJmE6KzO+5KJzXPT84UVZh+Ox3DqHjALUySKr8BL7YufcGM+drUqC+WU SES6puqwlzzvetzvUek4WPjLm4fFF4gyeJUvO5ns= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from rock.gnat.com (rock.gnat.com [IPv6:2620:20:4000:0:a9e:1ff:fe9b:1d1]) by sourceware.org (Postfix) with ESMTPS id 5C8EF3857418; Tue, 3 May 2022 05:38:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5C8EF3857418 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 7B441116532; Tue, 3 May 2022 01:38:22 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at gnat.com Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ZrNjyIYhilIG; Tue, 3 May 2022 01:38:22 -0400 (EDT) Received: from free.home (tron.gnat.com [IPv6:2620:20:4000:0:46a8:42ff:fe0e:e294]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPS id 4097D11613F; Tue, 3 May 2022 01:38:22 -0400 (EDT) Received: from livre (livre.home [172.31.160.2]) by free.home (8.15.2/8.15.2) with ESMTPS id 2435cFEC2683157 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 3 May 2022 02:38:15 -0300 To: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org Subject: [PATCH] [PR105324] libstdc++: testsuite: pr105324 requires FP from_char Organization: Free thinker, does not speak for AdaCore Date: Tue, 03 May 2022 02:38:15 -0300 Message-ID: <ory1zjfa60.fsf@lxoliva.fsfla.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.84 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: Alexandre Oliva via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Alexandre Oliva <oliva@adacore.com> Cc: Jonathan Wakely <jwakely@redhat.com> Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> |
Series |
[PR105324] libstdc++: testsuite: pr105324 requires FP from_char
|
|
Commit Message
Alexandre Oliva
May 3, 2022, 5:38 a.m. UTC
The floating-point overloads of from_char are only declared if _GLIBCXX_HAVE_USELOCALE is #defined as nonzero. That's exposed from charconv as _cpp_lib_to_chars >= 201611L, so guard the test body with that. Regstrapped on ppc64le-linux-gnu, and tested on x86_64-linux-gnu-x-ppc{,64}-vx7r2 (without _GLIBCXX_HAVE_USELOCALE). Ok to install? gcc-12? gcc-11? for libstdc++-v3/ChangeLog PR c++/105324 * testsuite/20_util/from_chars/pr105324.cc: Guard test body with conditional for floating-point overloads of from_char. --- .../testsuite/20_util/from_chars/pr105324.cc | 2 ++ 1 file changed, 2 insertions(+)
Comments
On Tue, 3 May 2022, 06:39 Alexandre Oliva via Libstdc++, < libstdc++@gcc.gnu.org> wrote: > > The floating-point overloads of from_char are only declared if > _GLIBCXX_HAVE_USELOCALE is #defined as nonzero. That's exposed from > charconv as _cpp_lib_to_chars >= 201611L, so guard the test body with > that. > > Regstrapped on ppc64le-linux-gnu, and tested on > x86_64-linux-gnu-x-ppc{,64}-vx7r2 (without _GLIBCXX_HAVE_USELOCALE). > Ok to install? gcc-12? gcc-11? > > > for libstdc++-v3/ChangeLog > > PR c++/105324 > * testsuite/20_util/from_chars/pr105324.cc: Guard test body > with conditional for floating-point overloads of from_char. > --- > .../testsuite/20_util/from_chars/pr105324.cc | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/libstdc++-v3/testsuite/20_util/from_chars/pr105324.cc > b/libstdc++-v3/testsuite/20_util/from_chars/pr105324.cc > index cecb17e41cc68..a9e08303ef49d 100644 > --- a/libstdc++-v3/testsuite/20_util/from_chars/pr105324.cc > +++ b/libstdc++-v3/testsuite/20_util/from_chars/pr105324.cc > @@ -5,10 +5,12 @@ > > int main() > { > +#if _cpp_lib_to_chars >= 201611L // FP from_char not available otherwise. > That macro should start with two underscores. OK for trunk and gcc-11 with that change. gcc-12 branch needs RM approval. OK for 12.2 if not approved for 12.1 // PR libstdc++/105324 > // std::from_chars() assertion at floating_from_chars.cc:78 > std::string s(512, '1'); > s[1] = '.'; > long double d; > std::from_chars(s.data(), s.data() + s.size(), d); > +#endif > } >
On May 3, 2022, Jonathan Wakely <jwakely.gcc@gmail.com> wrote: > That macro should start with two underscores. Doh! Wow, eagle eyes! :-) Good catch, thanks! Here's the corrected patch I'm installing, trunk for now, 12 and 11 once it's allowed in 12. > OK for trunk and gcc-11 with that change. > gcc-12 branch needs RM approval. OK for 12.2 if not approved for 12.1 [PR105324] libstdc++: testsuite: pr105324 requires FP from_char From: Alexandre Oliva <oliva@adacore.com> The floating-point overloads of from_char are only declared if _GLIBCXX_HAVE_USELOCALE is #defined as nonzero. That's exposed from charconv as __cpp_lib_to_chars >= 201611L, so guard the test body with that. for libstdc++-v3/ChangeLog PR c++/105324 * testsuite/20_util/from_chars/pr105324.cc: Guard test body with conditional for floating-point overloads of from_char. --- .../testsuite/20_util/from_chars/pr105324.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libstdc++-v3/testsuite/20_util/from_chars/pr105324.cc b/libstdc++-v3/testsuite/20_util/from_chars/pr105324.cc index cecb17e41cc68..ef24b4c5c7b71 100644 --- a/libstdc++-v3/testsuite/20_util/from_chars/pr105324.cc +++ b/libstdc++-v3/testsuite/20_util/from_chars/pr105324.cc @@ -5,10 +5,12 @@ int main() { +#if __cpp_lib_to_chars >= 201611L // FP from_char not available otherwise. // PR libstdc++/105324 // std::from_chars() assertion at floating_from_chars.cc:78 std::string s(512, '1'); s[1] = '.'; long double d; std::from_chars(s.data(), s.data() + s.size(), d); +#endif }
On Tue, 3 May 2022, 18:26 Alexandre Oliva, <oliva@adacore.com> wrote: > On May 3, 2022, Jonathan Wakely <jwakely.gcc@gmail.com> wrote: > > > That macro should start with two underscores. > > Doh! Wow, eagle eyes! :-) Good catch, thanks! > > Here's the corrected patch I'm installing, trunk for now, 12 and 11 once > it's allowed in 12. > Great, thanks. > > OK for trunk and gcc-11 with that change. > > > gcc-12 branch needs RM approval. OK for 12.2 if not approved for 12.1 > > > [PR105324] libstdc++: testsuite: pr105324 requires FP from_char > > From: Alexandre Oliva <oliva@adacore.com> > > The floating-point overloads of from_char are only declared if > _GLIBCXX_HAVE_USELOCALE is #defined as nonzero. That's exposed from > charconv as __cpp_lib_to_chars >= 201611L, so guard the test body with > that. > > > for libstdc++-v3/ChangeLog > > PR c++/105324 > * testsuite/20_util/from_chars/pr105324.cc: Guard test body > with conditional for floating-point overloads of from_char. > --- > .../testsuite/20_util/from_chars/pr105324.cc | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/libstdc++-v3/testsuite/20_util/from_chars/pr105324.cc > b/libstdc++-v3/testsuite/20_util/from_chars/pr105324.cc > index cecb17e41cc68..ef24b4c5c7b71 100644 > --- a/libstdc++-v3/testsuite/20_util/from_chars/pr105324.cc > +++ b/libstdc++-v3/testsuite/20_util/from_chars/pr105324.cc > @@ -5,10 +5,12 @@ > > int main() > { > +#if __cpp_lib_to_chars >= 201611L // FP from_char not available otherwise. > // PR libstdc++/105324 > // std::from_chars() assertion at floating_from_chars.cc:78 > std::string s(512, '1'); > s[1] = '.'; > long double d; > std::from_chars(s.data(), s.data() + s.size(), d); > +#endif > } > > > -- > Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ > Free Software Activist GNU Toolchain Engineer > Disinformation flourishes because many people care deeply about injustice > but very few check the facts. Ask me about <https://stallmansupport.org> >
diff --git a/libstdc++-v3/testsuite/20_util/from_chars/pr105324.cc b/libstdc++-v3/testsuite/20_util/from_chars/pr105324.cc index cecb17e41cc68..a9e08303ef49d 100644 --- a/libstdc++-v3/testsuite/20_util/from_chars/pr105324.cc +++ b/libstdc++-v3/testsuite/20_util/from_chars/pr105324.cc @@ -5,10 +5,12 @@ int main() { +#if _cpp_lib_to_chars >= 201611L // FP from_char not available otherwise. // PR libstdc++/105324 // std::from_chars() assertion at floating_from_chars.cc:78 std::string s(512, '1'); s[1] = '.'; long double d; std::from_chars(s.data(), s.data() + s.size(), d); +#endif }