https://gcc.gnu.org/g:d9641b64e988d57f93b9e95aabf507ff8134ef15

commit r16-4626-gd9641b64e988d57f93b9e95aabf507ff8134ef15
Author: Rainer Orth <[email protected]>
Date:   Sat Oct 25 20:15:41 2025 +0100

    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 <[email protected]>

Diff:
---
 gcc/jit/jit-recording.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/jit/jit-recording.cc b/gcc/jit/jit-recording.cc
index 6816a71dcd81..5c641f690d68 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),

Reply via email to