From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31856 invoked by alias); 3 Mar 2006 09:50:19 -0000 Received: (qmail 31834 invoked by uid 48); 3 Mar 2006 09:50:17 -0000 Date: Fri, 03 Mar 2006 09:50:00 -0000 Subject: [Bug c/26542] New: bogus diagnostic with -pedantic?: format ‘%p’ expects type ‘void*’, but argument 2 has type ‘A*’ X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pluto at agmk dot net" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-03/txt/msg00313.txt.bz2 List-Id: $ g++ warn.cpp -Wall -ansi no warnings. $ g++ warn.cpp -Wall -pedantic (...) format ‘%p’ expects type ‘void*’, but argument 2 has type ‘A*’ #include 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