From: Rainer Orth Date: Sat, 25 Oct 2025 19:15:41 +0000 (+0100) Subject: libgccjit: Fix bootstrap fail from format specifiers. X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d9641b64e988d57f93b9e95aabf507ff8134ef15;p=thirdparty%2Fgcc.git libgccjit: Fix bootstrap fail from format specifiers. The changes in r16-4527-gc11d9eaa8ac9ee caused format mismatches in jit-recording.cc because Darwin’s uint64_t == long long unsigned int (and the format specifiers were %ld and %li). gcc/jit/ChangeLog: * jit-recording.cc (recording::array_type::make_debug_string, recording::array_type::write_reproducer): Use PRIu64 format specifier for uint64_t. Signed-off-by: Iain Sandoe --- diff --git a/gcc/jit/jit-recording.cc b/gcc/jit/jit-recording.cc index 6816a71dcd8..5c641f690d6 100644 --- a/gcc/jit/jit-recording.cc +++ b/gcc/jit/jit-recording.cc @@ -3430,7 +3430,7 @@ recording::string * recording::array_type::make_debug_string () { return string::from_printf (m_ctxt, - "%s[%ld]", + "%s[%" PRIu64 "]", m_element_type->get_debug_string (), m_num_elements); } @@ -3446,7 +3446,7 @@ recording::array_type::write_reproducer (reproducer &r) " gcc_jit_context_new_array_type_u64 (%s,\n" " %s, /* gcc_jit_location *loc */\n" " %s, /* gcc_jit_type *element_type */\n" - " %li); /* int num_elements */\n", + " %" PRIu64 "); /* int num_elements */\n", id, r.get_identifier (get_context ()), r.get_identifier (m_loc),