Newer versions of GCC come with what I consider to be an irritating misfeature: they try to second-guess me, emitting useless "did you mean?" suggestions that drown out other warnings.
For example:
$ gcc -Wall -c -o /dev/null -xc - <<'EOT'
#include <stdlib.h>
void foo(char *b, size_t z){ readlink("/foo", b, z); }
EOT
<stdin>: In function ‘foo’:
<stdin>:3:30: warning: implicit declaration of function ‘readlink’;
did you mean ‘realloc’? [-Wimplicit-function-declaration]
No, I did not mean realloc
; I just forgot to include the unistd.h
header.
Is there any way to turn this off?
I want to have it print just implicit declaration of function ‘readlink’ [-Wimplicit-function-declaration]
, without the helpful suggestion.