public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-8224] libstdc++: Fix std::format test for Solaris [PR113450]
@ 2024-01-18 12:54 Jonathan Wakely
  0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2024-01-18 12:54 UTC (permalink / raw)
  To: gcc-cvs, libstdc++-cvs

https://gcc.gnu.org/g:db42a0a98916340af33338c08e6a7d328121b958

commit r14-8224-gdb42a0a98916340af33338c08e6a7d328121b958
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.

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 63702edbd42..30c5fc22237 100644
--- 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((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));

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-01-18 12:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-18 12:54 [gcc r14-8224] libstdc++: Fix std::format test for Solaris [PR113450] Jonathan Wakely

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).