https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116920
Bug ID: 116920 Summary: GCC should warn about redundant case around default in switch Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: xry111 at gcc dot gnu.org Target Milestone: --- int x; int main(int argc, char **argv) { switch (argc) { case 114: x = 514; break; case 1919: default: x = 810; } } In this test case "case 1919:" is either redundant, or indicating a programming error. Thus it'd be better if we emit a warning here.