All pastes #768107 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-11-10 09:11 UTC
rendered paste body
$ gcc -Wall -Wextra test.c
test.c:3: warning: return type of 'main' is not 'int'
test.c: In function 'main':
test.c:7: error: expected ';' before 'printf'
test.c:8: warning: implicit declaration of function 'scanf'
test.c:8: warning: incompatible implicit declaration of built-in function 'scanf'
test.c:8: warning: format '%d' expects type 'int *', but argument 2 has type 'int'
test.c:9: warning: format '%d' expects type 'int *', but argument 2 has type 'int'
test.c:10: warning: implicit declaration of function 'printf'
test.c:10: warning: incompatible implicit declaration of built-in function 'printf'
test.c:11: warning: implicit declaration of function 'getch'$ gcc -Wall -Wextra test.c



Again with adding #include <stdio.h>

test.c:5: warning: return type of 'main' is not 'int'
test.c: In function 'main':
test.c:9: error: expected ';' before 'printf'
test.c:10: warning: format '%d' expects type 'int *', but argument 2 has type 'int'
test.c:11: warning: format '%d' expects type 'int *', but argument 2 has type 'int'
test.c:13: warning: implicit declaration of function 'getch'