public inbox for libstdc++-cvs@sourceware.org help / color / mirror / Atom feed
From: Jonathan Wakely <redi@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r13-8238] libstdc++: Fix std::format test for Solaris [PR113450] Date: Thu, 18 Jan 2024 21:03:25 +0000 (GMT) [thread overview] Message-ID: <20240118210325.D9BFD3858420@sourceware.org> (raw) https://gcc.gnu.org/g:5240df78a07303a37b1f0b83165624d2a648089e commit r13-8238-g5240df78a07303a37b1f0b83165624d2a648089e Author: Jonathan Wakely <jwakely@redhat.com> Date: Wed Jan 17 21:40:25 2024 +0000 libstdc++: Fix std::format test for Solaris [PR113450] When int8_t is a typedef for char (rather than signed char) this test fails because it tries to format a char, which is treated differently from formatting other integral types (including signed char). Use signed char explicitly so the result doesn't depend on the non-portable definition of int8_t. libstdc++-v3/ChangeLog: PR libstdc++/113450 * testsuite/std/format/functions/format.cc: Use signed char instead of int8_t. (cherry picked from commit db42a0a98916340af33338c08e6a7d328121b958) Diff: --- libstdc++-v3/testsuite/std/format/functions/format.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libstdc++-v3/testsuite/std/format/functions/format.cc b/libstdc++-v3/testsuite/std/format/functions/format.cc index e9827d0b735..6c32100d0f8 100644 --- a/libstdc++-v3/testsuite/std/format/functions/format.cc +++ b/libstdc++-v3/testsuite/std/format/functions/format.cc @@ -351,7 +351,7 @@ test_minmax() s = std::format("{:b}" , std::numeric_limits<U>::max()); VERIFY( s == '1' + ones ); }; - check(std::int8_t(0)); + check((signed char)(0)); // int8_t is char on Solaris, see PR 113450 check(std::int16_t(0)); check(std::int32_t(0)); check(std::int64_t(0));
reply other threads:[~2024-01-18 21:03 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20240118210325.D9BFD3858420@sourceware.org \ --to=redi@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ --cc=libstdc++-cvs@gcc.gnu.org \ /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: linkBe 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).