[gcc r16-7525] diagnostics: Fix bootstrap on 32b Darwin hosts.
Iain D Sandoe
iains@gcc.gnu.org
Sun Feb 15 20:15:13 GMT 2026
https://gcc.gnu.org/g:dfc93622ad910dd509637c6db4996a6aadc166fa
commit r16-7525-gdfc93622ad910dd509637c6db4996a6aadc166fa
Author: Iain Sandoe <iain@sandoe.co.uk>
Date: Sun Feb 15 08:59:33 2026 +0000
diagnostics: Fix bootstrap on 32b Darwin hosts.
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>
Diff:
---
gcc/json.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/json.cc b/gcc/json.cc
index 3f87e2910093..7c541d972628 100644
--- a/gcc/json.cc
+++ b/gcc/json.cc
@@ -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;
}
}
More information about the Gcc-cvs
mailing list