https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92479
--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
Interestingly clang doesn't warn for
int main()
{
for(int i = 1;; i++){
if(0)
{
++i;
break;
}
}
}
which looks quite stupid (an empty stmt is OK though). In fact diagnosing
that specifically a 'break' is not reachable and controlling that with its
own option looks bogus.
I'm going to re-interpret -Wunreachable-code-{return,break} to mean to
diagnose unreachable code _after_ a return stmt or a break stmt. It really
looks like clang went out with a hammer, assigning a different option to
each diagnostic invocation with a different text ...