4 ms·
> "gcc -ansi -Wall -Wextra -pedantic". NOT ONE ERROR OR WARNING! $ rpm -q gcc gcc-4.8.2-7.fc20.x86_64 $ gcc -ansi -Wall -Wextra -pedantic test.c test.c
by CUViper 13y ago
> "gcc -ansi -Wall -Wextra -pedantic". NOT ONE ERROR OR WARNING!
$ rpm -q gcc
gcc-4.8.2-7.fc20.x86_64
$ gcc -ansi -Wall -Wextra -pedantic test.c
test.c: In function ‘main’:
test.c:7:36: warning: the comparison will always evaluate as ‘false’ for the address of ‘geteuid’ will never be NULL [-Waddress]
if (getuid() != 0 && geteuid == 0)
^
If fact, just -Wall is enough to enable that warning. Maybe the coverage of -Waddress has changed since your version?
- spc476 13y agoCould very well be. I am using a slightly older version of GCC.