int x = 5; goto JUMP; printf("x is : %d ",x); JUMP: int a = 0; <=== 错误,lable后面不能申明变量,只能是表达式语句(statement),哪怕是空语句.. printf("%d",a);
int x = 5; goto JUMP; printf("x is : %d ",x); JUMP: ; /// 空语句,正确 int a = 0; // 前面有空语句,正确 printf("%d",a);
label只在函数内有效
int x = 5; goto JUMP; printf("x is : %d ",x); JUMP: int a = 0; <=== 错误,lable后面不能申明变量,只能是表达式语句(statement),哪怕是空语句.. printf("%d",a);
int x = 5; goto JUMP; printf("x is : %d ",x); JUMP: ; /// 空语句,正确 int a = 0; // 前面有空语句,正确 printf("%d",a);
label只在函数内有效