https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63558
Bug ID: 63558 Summary: cannot silence "jump to case label" with fpermissive Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: manu at gcc dot gnu.org extern int abs(int); static long int n_ants; enum enum_var_types { VAR_NONE, VAR_DELTA, VAR_SWITCH }; static enum enum_var_types option_var_n_ants; void adapt_parameters_next_iteration(void) { switch(option_var_n_ants) { case VAR_NONE: break; case VAR_DELTA: int trunc_n_ants = 0; n_ants += trunc_n_ants; break; case VAR_SWITCH: break; default: break; } } $ ~/test1/216257/build/gcc/cc1plus -fpermissive adaptation.ii adaptation.ii:18:10: warning: jump to case label [-fpermissive] case VAR_SWITCH: ^ adaptation.ii:15:13: error: crosses initialization of ‘int trunc_n_ants’ int trunc_n_ants = 0; ^ adaptation.ii:20:7: warning: jump to case label [-fpermissive] default: break; ^ adaptation.ii:15:13: error: crosses initialization of ‘int trunc_n_ants’ int trunc_n_ants = 0; ^ The error should be an inform that is conditional on the previous permerror return value. (And what's up with the extra spacing before 'crosses'?)