From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by sourceware.org (Postfix) with ESMTPS id 753EA385840F; Tue, 3 May 2022 07:10:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 753EA385840F Received: by mail-wm1-x331.google.com with SMTP id k126-20020a1ca184000000b003943fd07180so738801wme.3; Tue, 03 May 2022 00:10: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=U39UKGIha1MmJcIkVW5PQU7lBvaTkmYYficv+Rvo3YI=; b=ZErie0YsQy/j5rzSshOa+bi0k7D4BaGeXE7HeMXjNS6LK3OciqX+IYWCfFuN6i2+yv 6Qf4fzRHypYj6QIpCTGUGQKjgtC5/2G9cHlqVfymIadxw3+J/VfG/+Y/pa7+F4WiH6lF drY2DovIbY5I19ay8DsATjeRqbRrnFv35d5Qfrb84n6mr4EazI1b9JN5k3FWltaCOPjw C35nzoxESAx/pszgTm0cxf4U8lFg8h90ANGkU6h1eiQBPH1iA9xXod9yM3aYdpUUk4sh io/9wmAtd19F2WJm1xhwrlqPDkTvLeMsCHHVktH6goC5OlofWWnsISO2HPRbpPblDQOv wmVQ== X-Gm-Message-State: AOAM530l/4mpBhuwiuEXYcspiq3BR26uTuDKSqZ0rx5jAHCrPXoxmJDg dbCaEwSMMqhSN0IjnT+maPuOqJfhv9Jh6Rzm4cY= X-Google-Smtp-Source: ABdhPJzTdoePZDUzKtcSH55fYEdQ0CrB/WogjqCJ432aOqooteVm/iiJPVzgizREg3nTfXCDM3W1ktlCfyQVlbmasMg= X-Received: by 2002:a05:600c:3492:b0:392:97ba:9581 with SMTP id a18-20020a05600c349200b0039297ba9581mr2103405wmq.163.1651561838466; Tue, 03 May 2022 00:10:38 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jonathan Wakely Date: Tue, 3 May 2022 08:10:26 +0100 Message-ID: Subject: Re: [PATCH] [PR105324] libstdc++: testsuite: pr105324 requires FP from_char To: Alexandre Oliva Cc: gcc-patches , "libstdc++" , Jonathan Wakely X-Spam-Status: No, score=-7.0 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 07:10:42 -0000 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 > } >