prog.c:8:1: warning: data definition has no type or storage class
err = ERROR_CODE_1;
^~~
prog.c:8:1: warning: type defaults to ‘int’ in declaration of ‘err’ [-Wimplicit-int]
prog.c:8:1: error: redefinition of ‘err’
prog.c:4:5: note: previous definition of ‘err’ was here
int err = 0;
^~~
prog.c:10:1: error: expected identifier or ‘(’ before ‘switch’
switch(err){
^~~~~~