Re: gcc-4.2 -pedantic is too pedantic
Re: gcc-4.2 -pedantic is too pedantic
- Subject: Re: gcc-4.2 -pedantic is too pedantic
- From: John Reppy <email@hidden>
- Date: Wed, 16 Sep 2009 13:54:06 -0500
Done. Bug number 7228852.
On Sep 16, 2009, at 12:30 PM, Chris Espinosa wrote:
On Sep 16, 2009, at 7:41 AM, John Reppy wrote:
When compiling some existing code on Snow Leopard, I'm getting
warnings
about the use the use of the "%p" format specifier that seem
excessive.
For example
<jhr@woton> cat p.c
#include <stdio.h>
void foo (int *x) { printf("%p\n", x); }
<jhr@woton> gcc -c -pedantic -m64 p.c
p.c: In function ‘foo’:
p.c:2: warning: format ‘%p’ expects type ‘void *’, but argument 2
has type ‘int *’
Since pointer types silently convert to void * in other cases, this
warning
seems wrong to me.
FWIW I've also compiled this example using gcc 4.3 on Linux and do
not get a warning.
Is this behavior a bug or a feature?
This is not specifically known in gcc 4.2 but seems related to
another known bug. Please file a bug report and refer to bug 5935478.
Chris
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden