From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by sourceware.org (Postfix) with ESMTPS id E09A93955C92; Tue, 3 May 2022 17:42:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E09A93955C92 Received: by mail-wm1-x332.google.com with SMTP id v64-20020a1cac43000000b0038cfd1b3a6dso1812017wme.5; Tue, 03 May 2022 10:42:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=k04cl5IsReIuonKjCQp3mfTsKmD6zXfBYqhKQW9EzJc=; b=ukTvumBC5hqF0Rpq/30FTRDPRiszxer/fQirCyABWEgfx3f9P9mkpkXoX4edL7mNVF wW03ZSpKPX7LKfRNrgvGUSHLY00YjIHNO2TCVTVqUf/lmUv0dRYVDWCRt3az0lbP3Wtm VUoihdcmB3I/GNLNo7wzn5kxusNnjmLCAkXor9bbRbli75kFbiTvU3fd44C+NMzmDWjJ D1Bs4F66aYILNHxkLlverI21uYzNL0aX5Gq55IbDOSp+paYDXja7MaxtrWpeIOk0ncvt 4010+KUVn5pQeRKL0UlfoJSXsWezLspm2HaT9wwBksnFFNsD7PfG1ZhQj1V/RqK/QpTr pSjw== X-Gm-Message-State: AOAM530nsoeoMbDH4mkM1mANaAko9Fl9xYhfWE5dsc1PNGjypyVjfl+v lXTFgwLRVoLCberrYmY2vZZ4H4v4dqziMao94Qc= X-Google-Smtp-Source: ABdhPJwVW34MkxCKw6+NNz+lUnK5rP8hI1GqvKtPNj/hhY62buX4kQ5MpGB18pL3kZnh9nbA7wpEZGGse5hKqQp/sIY= X-Received: by 2002:a7b:c8c3:0:b0:394:547c:e5af with SMTP id f3-20020a7bc8c3000000b00394547ce5afmr1685656wml.202.1651599758853; Tue, 03 May 2022 10:42:38 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jonathan Wakely Date: Tue, 3 May 2022 18:42:26 +0100 Message-ID: Subject: Re: [PATCH v2] [PR105324] libstdc++: testsuite: pr105324 requires FP from_char To: Alexandre Oliva Cc: gcc-patches , "libstdc++" , Jonathan Wakely X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, 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 Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: Tue, 03 May 2022 17:42:43 -0000 On Tue, 3 May 2022, 18:26 Alexandre Oliva, wrote: > On May 3, 2022, Jonathan Wakely 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 > > 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 >