From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 95B053858D33; Wed, 17 Jan 2024 21:32:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 95B053858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705527144; bh=axzFNEoIJQXeVAOZhUshtJw2xo55WE0VSR3Uo6C6PwA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=gVpnEAh8vS2wM/KWOVu0wwOIMLLCG0/35TmO0YW5nyds2nnQUZeJe8Bt6v3HuiYO+ hgqXuE6/xwFj85xHiduzB/+6uEo0QFabPz/wzS+OIx+hu0MPWk2WqcsQs22aZeooLD 45xWSANRq7OhPtnwyA2lKGY9Db8W0YoKWRR+2/uQ= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/113450] [14 Regression] std/format/functions/format.cc FAILs Date: Wed, 17 Jan 2024 21:32:24 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: everconfirmed bug_status cf_reconfirmed_on Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113450 Jonathan Wakely changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed| |2024-01-17 --- Comment #1 from Jonathan Wakely --- I assume that int8_t is char on Solaris, rather than signed char? Formatting a char behaves differently from signed char, and other integral types. I think this will fix it: --- a/libstdc++-v3/testsuite/std/format/functions/format.cc +++ b/libstdc++-v3/testsuite/std/format/functions/format.cc @@ -365,7 +365,7 @@ test_minmax() s =3D std::format("{:b}" , std::numeric_limits::max()); VERIFY( s =3D=3D '1' + ones ); }; - check(std::int8_t(0)); + check(std::make_signed_t(0)); check(std::int16_t(0)); check(std::int32_t(0)); check(std::int64_t(0)); That causes the lambda to use signed char instead of char, and that is formatted as an integer not a character.=