https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108476
Xi Ruoyao <xry111 at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |xry111 at gcc dot gnu.org --- Comment #5 from Xi Ruoyao <xry111 at gcc dot gnu.org> --- (In reply to Florian Weimer from comment #4) > For GCC 14, we have -Wreturn-mismatch turned on by default, as an error. > This diagnoses cases of extra or missing expressions in return statements. > Together with the other warnings-as-errors changes, this seems to cover the > request in the description. It only catches int f() { return; } not a plain int f() {} AFAIK the standard (even the latest C23) still disallows us from simply rejecting the latter.