gcc-4.2 -pedantic is too pedantic
gcc-4.2 -pedantic is too pedantic
- Subject: gcc-4.2 -pedantic is too pedantic
- From: John Reppy <email@hidden>
- Date: Wed, 16 Sep 2009 09:41:42 -0500
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?
_______________________________________________
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