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

            Bug ID: 78014
           Summary: -Wformat -vs- size_t
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tromey at gcc dot gnu.org
  Target Milestone: ---

Compile this test program with -Wformat:

#include <stdio.h>

int main() {
  size_t x = 0;

  printf("got %lu\n", x);
}

I expected this to give a warning, because the correct format should
be %zu.  %lu happens to be correct on this machine, but on a 32-bit
machine it is not.

Reply via email to