https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113450
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed| |2024-01-17 --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- 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 = std::format("{:b}" , std::numeric_limits<U>::max()); VERIFY( s == '1' + ones ); }; - check(std::int8_t(0)); + check(std::make_signed_t<std::int8_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.