#include <stdio.h> int main(void) { int val = 0; switch( val ) { case 0: int b = 8; break; case 2: int b = 4; break; } return 0; }
Standard input is empty
prog.c: In function 'main':
prog.c:8:9: error: a label can only be part of a statement and a declaration is not a statement
int b = 8;
^
prog.c:11:9: error: a label can only be part of a statement and a declaration is not a statement
int b = 4;
^
prog.c:11:13: error: redefinition of 'b'
int b = 4;
^
prog.c:8:13: note: previous definition of 'b' was here
int b = 8;
^
prog.c:11:13: warning: unused variable 'b' [-Wunused-variable]
int b = 4;
^
Standard output is empty