https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86899
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Doesn't seem to be a real regression to me, we've only stopped warning about this with -Wreturn-type -fsanitize=thread in r254437 and started again in r255403, that is less than month and no releases have been released with that. We weren't warning before r219202 though. Note, it is the same warning you get with e.g. struct A { A (); ~A (); }; int foo() { A a; return 0; if(0) { return 0; } } or anything that needs a cleanup, -Wreturn-type is a simple warning and if you try hard to screw it up, you'll manage to do it. Any reason why we shouldn't warn on this though? It is clearly useless dead code that is better removed when the compiler warns about it...