prog.cpp: In function ‘int main()’:
prog.cpp:6:34: error: use of enum ‘foo1’ without previous declaration
prog.cpp:6:34: error: use of enum ‘foo1’ without previous declaration
prog.cpp:6:29: error: expected primary-expression before ‘enum’
prog.cpp:6:29: error: expected ‘)’ before ‘enum’
prog.cpp:8:20: error: expected ‘)’ before ‘;’ token
prog.cpp:9:7: error: ‘else’ without a previous ‘if’
prog.cpp:11:9: error: case label not within a switch statement
prog.cpp:10:1: warning: label ‘l’ defined but not used [-Wunused-label]