Language
C
Compiler
gcc 12.1.0
Options
Compiler Default
no pedantic
Raw compiler options
-Wall
-Werror
$ gcc prog.c -Wall -Werror
Exit Code:
1
Author
anonymous
almost 3 years ago
C
gcc 12.1.0
Author
anonymous
almost 3 years ago
$ gcc prog.c -Wall -Werror
prog.c: In function 'main':
prog.c:7:14: error: format '%s' expects argument of type 'char *', but argument 2 has type 'int' [-Werror=format=]
7 | printf("%s", x); //Error cause i'm using %s for a char
| ~^ ~
| | |
| | int
| char *
| %d
cc1: all warnings being treated as errors