[Bug c++/78014] New: -Wformat -vs- size_t
tromey at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Oct 17 19:47:00 GMT 2016
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.
More information about the Gcc-bugs
mailing list