From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: Alexandre Oliva <oliva@adacore.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>,
"libstdc++" <libstdc++@gcc.gnu.org>,
Jonathan Wakely <jwakely@redhat.com>
Subject: Re: [PATCH v2] [PR105324] libstdc++: testsuite: pr105324 requires FP from_char
Date: Tue, 3 May 2022 18:42:26 +0100 [thread overview]
Message-ID: <CAH6eHdSwNbF9MGVH9XdG2zbLt7SB+uh4u5xWPS7-mX3_z8nK0g@mail.gmail.com> (raw)
In-Reply-To: <orczgufryx.fsf_-_@lxoliva.fsfla.org>
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>
>
prev parent reply other threads:[~2022-05-03 17:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-03 5:38 [PATCH] " Alexandre Oliva
2022-05-03 7:10 ` Jonathan Wakely
2022-05-03 17:25 ` [PATCH v2] " Alexandre Oliva
2022-05-03 17:42 ` 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=CAH6eHdSwNbF9MGVH9XdG2zbLt7SB+uh4u5xWPS7-mX3_z8nK0g@mail.gmail.com \
--to=jwakely.gcc@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jwakely@redhat.com \
--cc=libstdc++@gcc.gnu.org \
--cc=oliva@adacore.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).