This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/26542] New: bogus diagnostic with -pedantic?: format ‘%p’ expects type ‘void*’, but argument 2 has type ‘A*’
- From: "pluto at agmk dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Mar 2006 09:50:17 -0000
- Subject: [Bug c/26542] New: bogus diagnostic with -pedantic?: format ‘%p’ expects type ‘void*’, but argument 2 has type ‘A*’
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
$ 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