[gcc r17-2674] Use HOST_SIZE_T_PRINT_UNSIGNED instead of %zu format string

John David Anglin via Gcc-cvs <[email protected]>
Newsgroups gmane.comp.gcc.cvs
Message-ID <[email protected]>
https://gcc.gnu.org/g:36f131b48e6a843e4d5c531e293cbba5e4256ada

commit r17-2674-g36f131b48e6a843e4d5c531e293cbba5e4256ada
Author: John David Anglin <[email protected]>
Date:   Thu Jul 23 15:19:39 2026 -0400

    Use HOST_SIZE_T_PRINT_UNSIGNED instead of %zu format string
    
    Not all hosts support the "z" format length modifier.  Noticed
    by inspection.
    
    2026-07-23  John David Anglin  <[email protected]>
    
    gcc/ChangeLog:
    
            * crc-verification.cc (sb_match): Use HOST_SIZE_T_PRINT_UNSIGNED
            instead of "%zu".
            (lfsr_and_crc_bits_match): Likewise.

Diff:
---
 gcc/crc-verification.cc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gcc/crc-verification.cc b/gcc/crc-verification.cc
index e15ac0f30509..ead4b81365cc 100644
--- a/gcc/crc-verification.cc
+++ b/gcc/crc-verification.cc
@@ -1026,7 +1026,8 @@ sb_match (const value *lfsr, const value *crc_value, size_t sb_index,
   else if (sb_index == 0)
     {
       if (dump_file && (dump_flags & TDF_DETAILS))
-	fprintf (dump_file, "Checking %zu bit.\n", it_end);
+	fprintf (dump_file, "Checking " HOST_SIZE_T_PRINT_UNSIGNED " bit.\n",
+		 (fmt_size_t) it_end);
 
       if (!given_sb_match ((*crc_value)[it_end], (*lfsr)[it_end], value))
 	return false;
@@ -1055,7 +1056,8 @@ lfsr_and_crc_bits_match (const value *lfsr, const value *crc_state,
   for (; i < it_end; i++)
     {
       if (dump_file && (dump_flags & TDF_DETAILS))
-	fprintf (dump_file, "Checking %zu bit.\n", i);
+	fprintf (dump_file, "Checking " HOST_SIZE_T_PRINT_UNSIGNED " bit.\n",
+		 (fmt_size_t) i);
 
       /* Check the case when in lfsr we have LFSR (i)^LFSR (SBi),
 	 where 0<i<LFSR_size and SBi is the index of MSB/LSB (LFSR_size-1/0).
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.