https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90205

--- Comment #10 from Jonny Grant <jg at jguk dot org> ---
printf("sizeof time_t %ld\n", sizeof(time_t));

Another example, but suggesting the same %ld from a sizeof

broken.c:34:29: error: format ‘%ld’ expects argument of type ‘long int’, but
argument 2 has type ‘long unsigned int’ [-Werror=format=]
   34 |     printf("sizeof time_t %ld\n", sizeof(time_t));
      |                           ~~^     ~~~~~~~~~~~~~~
      |                             |     |
      |                             |     long unsigned int
      |                             long int
      |                           %ld


Probably %zu is the appropriate format to be suggested?

Reply via email to