$ g++ warn.cpp -Wall -ansi no warnings. $ g++ warn.cpp -Wall -pedantic (...) format ‘%p’ expects type ‘void*’, but argument 2 has type ‘A*’
#include <cstdio> struct A {}; int main() { A* a = 0; printf("a = 0x%p\n", a); return 0; } -- Summary: bogus diagnostic with -pedantic?: format ‘%p’ expects type ‘void*’, but argument 2 has type ‘A*’ Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: minor Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pluto at agmk dot net GCC build triplet: x86-64-linux GCC host triplet: x86-64-linux GCC target triplet: x86-64-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26542