Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

about 3 years ago

Language

C

Compiler

gcc 12.1.0

Options
Compiler Default
no pedantic
Raw compiler options
-Wall -Werror

Author

anonymous

about 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
Exit Code:
1