https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84180
Bug ID: 84180 Summary: -Wimplicit-fallthrough=2 heuristic fails when condition in the case Product: gcc Version: 7.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: Patrick.Schluter at ec dot europa.eu Target Milestone: --- A case containing a condition recognizes that it may fall through but the heuristic to suppress the warning doesn't work at level 2. IMO it should. Simple example to trigger the behaviour case OPEN_FILE: if( !access(name, F_OK)) { ... break; } /* fallthrough */ case CREATE_FILE: ... The warning is suppressed only at level 1 of the -Wimplicit-fallthrough= option.