Language
C
Compiler
gcc HEAD 9.0.0 20190109 (experimental)
Options
Warnings
C11(GNU)
no pedantic
Raw compiler options
-Werror
$ gcc prog.c -Wall -Wextra -std=gnu11 -Werror
Exit Code:
1
Author
anonymous
about 6 years ago
C
gcc HEAD 9.0.0 20190109 (experimental)
Author
anonymous
about 6 years ago
$ gcc prog.c -Wall -Wextra -std=gnu11 -Werror
prog.c: In function 'doStuff':
prog.c:4:17: error: unused parameter 'pA' [-Werror=unused-parameter]
4 | void doStuff(A* pA) {};
| ~~~^~
prog.c: In function 'main':
prog.c:8:12: error: passing argument 1 of 'doStuff' from incompatible pointer type [-Werror=incompatible-pointer-types]
8 | doStuff(&b);
| ^~
| |
| B * {aka struct B *}
prog.c:4:17: note: expected 'A *' {aka 'struct A *'} but argument is of type 'B *' {aka 'struct B *'}
4 | void doStuff(A* pA) {};
| ~~~^~
cc1: all warnings being treated as errors