https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82134
--- Comment #2 from Zack Weinberg <zackw at panix dot com> --- The claim in the Stack Overflow post was that this was useful in a scenario involving machine-generated code that couldn't return void for some external reason, but they didn't go into any kind of detail. It has always been my opinion that warnings in general should be made optimization-independent, including early dead code optimizations like this, with _possible_ carefully-defined-and-documented exceptions for `if (0) { /* don't warn about stuff in here */ }` and similar. But I realize that's a long way from where GCC is or has ever been.