foo.c: In function 'main':
foo.c:7:2: error: 'for' loop initial declarations are only allowed in C99 mode
foo.c:7:2: note: use option -std=c99 or -std=gnu99 to compile your code
foo.c:9:2: error: 'for' loop initial declarations are only allowed in C99 mode
foo.c:12:3: error: 'for' loop initial declarations are only allowed in C99 mode
foo.c:16:11: error: redefinition of 'i'
foo.c:7:11: note: previous definition of 'i' was here
foo.c:16:2: error: 'for' loop initial declarations are only allowed in C99 mode
foo.c:21:1: warning: control reaches end of non-void function [-Wreturn-type]