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

--- Comment #2 from Jonny Grant <jg at jguk dot org> ---
Just posted this on bug 90205 but maybe more appropriate here
gcc (Ubuntu 12.2.0-3ubuntu1) 12.2.0

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


printf("sizeof time_t %zu\n", sizeof(time_t));

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

Reply via email to