Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

about 5 years ago

Language

Compiler

Options

Author

anonymous

about 5 years ago

$
prog.c: In function 'main':
prog.c:6:14: warning: initialization of 'int *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    6 |   int *px2 = x;   // WRONG!  Warns: "makes a pointer from
      |              ^
prog.c:10:11: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'int' [-Wformat=]
   10 |   scanf("%d", x);   // WRONG! Modern compilers will warn
      |          ~^   ~
      |           |   |
      |           |   int
      |           int *
Exit Code:
0