Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 8 years ago

Language

Compiler

Options

Author

anonymous

over 8 years ago

$
prog.c:2:1: warning: data definition has no type or storage class [enabled by default]
 i;b(char*s){i+=i+*s++%2;i=*s?b(s):i;}
 ^
prog.c:2:1: warning: type defaults to 'int' in declaration of 'i' [enabled by default]
prog.c:2:3: warning: return type defaults to 'int' [enabled by default]
 i;b(char*s){i+=i+*s++%2;i=*s?b(s):i;}
   ^
prog.c:4:1: warning: data definition has no type or storage class [enabled by default]
 v[32];
 ^
prog.c:4:1: warning: type defaults to 'int' in declaration of 'v' [enabled by default]
prog.c:5:1: warning: return type defaults to 'int' [enabled by default]
 main()
 ^
prog.c: In function 'main':
prog.c:7:5: warning: passing argument 1 of 'gets' from incompatible pointer type [enabled by default]
     gets(v);
     ^
In file included from prog.c:1:0:
/usr/include/stdio.h:636:14: note: expected 'char *' but argument is of type 'int *'
 extern char *gets (char *__s) __wur;
              ^
prog.c:8:5: warning: passing argument 1 of 'b' from incompatible pointer type [enabled by default]
     printf("%d",b(v));
     ^
prog.c:2:3: note: expected 'char *' but argument is of type 'int *'
 i;b(char*s){i+=i+*s++%2;i=*s?b(s):i;}
   ^
prog.c: In function 'b':
prog.c:2:1: warning: control reaches end of non-void function [-Wreturn-type]
 i;b(char*s){i+=i+*s++%2;i=*s?b(s):i;}
 ^
42
Exit Code:
0