On Thu, 2024-02-01 at 14:01 +0100, Jakub Jelinek wrote:
> On Thu, Feb 01, 2024 at 12:45:31PM +0000, Jonathan Yong wrote:
> > Attached patch OK? Copied inline for review convenience.
> 
> No, I think e.g. AIX doesn't support the z modifier.
> I don't see %zd or %zu used anywhere except in gcc/jit/ which presumably
> doesn't work on AIX.
> 
> If you really want to avoid truncation, perhaps do something like
>   if (internal_flag_ira_verbose > 0 && ira_dump_file != NULL)
>     {
>       if (sizeof (void *) <= sizeof (long))
>       fprintf (ira_dump_file,
>                "+++Allocating %lu bytes for conflict table "
>                "(uncompressed size %lu)\n",
>                (unsigned long) (sizeof (IRA_INT_TYPE) * allocated_words_num),
>                (unsigned long) (sizeof (IRA_INT_TYPE) * object_set_words
>                                 * ira_objects_num));
>       else
>       fprintf (ira_dump_file,
>                "+++Allocating %l" PRIu64 "bytes for conflict table "
>                "(uncompressed size %" PRIu64 ")\n",

Should use HOST_WIDE_INT_PRINT_UNSIGNED instead of PRIu64.

>                (unsigned HOST_WIDE_INT) (sizeof (IRA_INT_TYPE)
>                                          * allocated_words_num),
>                (unsigned HOST_WIDE_INT) (sizeof (IRA_INT_TYPE)
>                                          * object_set_words
>                                          * ira_objects_num));
>     }

-- 
Xi Ruoyao <xry...@xry111.site>
School of Aerospace Science and Technology, Xidian University

Reply via email to