]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
diagnostics: Fix bootstrap on 32b Darwin hosts.
authorIain Sandoe <iain@sandoe.co.uk>
Sun, 15 Feb 2026 08:59:33 +0000 (08:59 +0000)
committerIain Sandoe <iain@sandoe.co.uk>
Sun, 15 Feb 2026 20:12:01 +0000 (20:12 +0000)
The change in r16-7507 misses a cast on the value to pp_scalar which
leads to a bootstrap fail on 32b hosts where size_t has a different
declaration from the value.  Fixed by applying the fmt_size_t cast.

gcc/ChangeLog:

* json.cc (pointer::token::print): Cast the value to pp_scalar
with (fmt_size_t).

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
gcc/json.cc

index 3f87e2910093c6f47444a7dd48d0572ea03f6573..7c541d972628784510d10700290379beeea7b0a5 100644 (file)
@@ -151,7 +151,7 @@ pointer::token::print (pretty_printer *pp) const
       break;
 
     case kind::array_index:
-      pp_scalar (pp, HOST_SIZE_T_PRINT_UNSIGNED, m_data.u_index);
+      pp_scalar (pp, HOST_SIZE_T_PRINT_UNSIGNED, (fmt_size_t) m_data.u_index);
       break;
     }
 }