]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libgccjit: Fix bootstrap fail from format specifiers.
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Sat, 25 Oct 2025 19:15:41 +0000 (20:15 +0100)
committerIain Sandoe <iain@sandoe.co.uk>
Sun, 26 Oct 2025 06:24:26 +0000 (06:24 +0000)
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 <iain@sandoe.co.uk>
gcc/jit/jit-recording.cc

index 6816a71dcd81e693bb3a9f39e133c619bc3b11f6..5c641f690d680e6844e060d692f49a2656ddcf58 100644 (file)
@@ -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),