https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70475
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |manu at gcc dot gnu.org --- Comment #5 from Manuel López-Ibáñez <manu at gcc dot gnu.org> --- (In reply to Markus Trippelsdorf from comment #2) > (In reply to Markus Trippelsdorf from comment #1) > > See discussion in PR69415. > > Sorry wrong bug number. > IMHO it is OK to warn for the code above. I also agree with this and I think the warning seems appropriate. An even clearer case: if (a) not_error(); goto everything_ok; goto error; or what about: if (a) not_error(); goto everything_ok; goto error; This is not Python! :-) Note that you can easily silence the warning with explicit braces. I think we discussed adding a heuristic for column 1 such that we would not warn for: else do_stuff(); more_stuff(); if (a) do_stuff(); more_stuff(); However, I'm not sure it was ever added.