]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gengtype: Use HOST_SIZE_T_PRINT_UNSIGNED in another spot
authorJakub Jelinek <jakub@redhat.com>
Mon, 12 Feb 2024 17:52:01 +0000 (18:52 +0100)
committerJakub Jelinek <jakub@redhat.com>
Mon, 12 Feb 2024 17:52:01 +0000 (18:52 +0100)
This patch depends on the libiberty/vprintf-support.c change.

2024-02-12  Jakub Jelinek  <jakub@redhat.com>

* gengtype.cc (adjust_field_rtx_def): Use HOST_SIZE_T_PRINT_UNSIGNED
and cast to fmt_size_t instead of %lu and cast to unsigned long.

gcc/gengtype.cc

index b1db727b9581c85903a6784189f701364e4ef6fa..87f8090544c1ee7bc0275af827eeb24ce36b1544 100644 (file)
@@ -1344,8 +1344,10 @@ adjust_field_rtx_def (type_p t, options_p ARG_UNUSED (opt))
            }
 
          subfields = create_field (subfields, t,
-                                   xasprintf (".fld[%lu].%s",
-                                              (unsigned long) aindex,
+                                   xasprintf (".fld["
+                                              HOST_SIZE_T_PRINT_UNSIGNED
+                                              "].%s",
+                                              (fmt_size_t) aindex,
                                               subname));
          subfields->opt = nodot;
          if (t == note_union_tp)