https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98750
Bug ID: 98750 Summary: does not detect dead code Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: tiagomacarios at gmail dot com Target Milestone: --- for the following code gcc will not detect that f() is never called. msvc detects this correctly. https://godbolt.org/z/Y5n78v ``` void f(); void _(int num) { switch (num) { case 1: break; f(); } } ```