Is there any reason why "gcc -Wall" doesn't emit warnings by default on some useless extensions such as pointer arithmetic on (void *)?
IMHO, such an extension is useless because there's an easy workaround: use casts to char *. And since g++ barfs on pointer arithmetic on void *, such a warning would be very useful. BTW, gcc is also silent when -Wc++-compat is used! With gcc/g++ 4.3.1: vin% cat ptrarith.c void *foo (void *p) { return p + 1; } vin% gcc -Wall -Wc++-compat -c ptrarith.c vin% g++ -c ptrarith.c ptrarith.c: In function 'void* foo(void*)': ptrarith.c:3: error: pointer of type 'void *' used in arithmetic vin% So, basically shouldn't -Wpointer-arith (and possible other ones) be added to the options enabled by -Wall? -- Vincent Lefèvre <[EMAIL PROTECTED]> - Web: <http://www.vinc17.org/> 100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/> Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)