[5/7] libstdc++: printf format string fix in testsuite

Message ID 3557908.R56niFO833@minbar
State Accepted
Headers
Series Work on PR108030 and several simd bugfixes and testsuite improvements |

Checks

Context Check Description
snail/gcc-patch-check success Github commit url

Commit Message

Matthias Kretz Feb. 15, 2023, 8:50 p.m. UTC
  Signed-off-by: Matthias Kretz <m.kretz@gsi.de>

libstdc++-v3/ChangeLog:

	* testsuite/experimental/simd/tests/bits/verify.h
	(verify::verify): Use %zx for size_t in format string.
---
 libstdc++-v3/testsuite/experimental/simd/tests/bits/verify.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


--
──────────────────────────────────────────────────────────────────────────
 Dr. Matthias Kretz                           https://mattkretz.github.io
 GSI Helmholtz Centre for Heavy Ion Research               https://gsi.de
 stdₓ::simd
──────────────────────────────────────────────────────────────────────────
  

Comments

Jonathan Wakely Feb. 15, 2023, 11:16 p.m. UTC | #1
On Wed, 15 Feb 2023 at 20:52, Matthias Kretz via Libstdc++
<libstdc++@gcc.gnu.org> wrote:
>
>
>
> Signed-off-by: Matthias Kretz <m.kretz@gsi.de>
>
> libstdc++-v3/ChangeLog:
>
>         * testsuite/experimental/simd/tests/bits/verify.h
>         (verify::verify): Use %zx for size_t in format string.
> ---
>  libstdc++-v3/testsuite/experimental/simd/tests/bits/verify.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

I think this one would be OK to commit without approval, as "obvious".

OK for all relevant branches anyway.
  

Patch

diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/bits/verify.h b/libstdc++-v3/testsuite/experimental/simd/tests/bits/verify.h
index 2ab3ad3fa8c..01ad50bd01a 100644
--- a/libstdc++-v3/testsuite/experimental/simd/tests/bits/verify.h
+++ b/libstdc++-v3/testsuite/experimental/simd/tests/bits/verify.h
@@ -137,7 +137,7 @@  public:
     {
       if (m_failed)
 	[&] {
-	  __builtin_fprintf(stderr, "%s:%d: (%s):\nInstruction Pointer: %x\n"
+	  __builtin_fprintf(stderr, "%s:%d: (%s):\nInstruction Pointer: %zx\n"
 				    "Assertion '%s' failed.\n",
 			    file, line, func, m_ip, cond);
 	  (print(extra_info, int()), ...);