foo.c:3:1: error: unknown type name 'bool'
foo.c: In function 'main':
foo.c:6:1: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
foo.c:6:1: warning: incompatible implicit declaration of built-in function 'scanf' [enabled by default]
foo.c:7:1: error: 'for' loop initial declarations are only allowed in C99 mode
foo.c:7:1: note: use option -std=c99 or -std=gnu99 to compile your code
foo.c:9:9: error: redefinition of 'i'
foo.c:7:9: note: previous definition of 'i' was here
foo.c:9:1: error: 'for' loop initial declarations are only allowed in C99 mode
foo.c:10:15: error: 'true' undeclared (first use in this function)
foo.c:10:15: note: each undeclared identifier is reported only once for each function it appears in
foo.c:12:1: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
foo.c:12:1: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]
foo.c: At top level:
foo.c:15:1: error: unknown type name 'bool'
foo.c: In function 'work':
foo.c:17:1: error: 'for' loop initial declarations are only allowed in C99 mode
foo.c:19:8: error: 'false' undeclared (first use in this function)
foo.c:20:8: error: 'true' undeclared (first use in this function)
foo.c:21:1: warning: control reaches end of non-void function [-Wreturn-type]