Re:Useful GCC warning options not enabled by -Wall -Wextra
by Sean1708 on Thursday October 05, 2017 @05:39AM
(#15407820)
Just FYI, not all undefined behaviour can be detected at compile time using current C semantics. I'm very very in favour of cracking down on undefined behaviour and changing things from undefined to implementation-defined and stuff like that, but it's not as easy as just flicking a switch and making the compiler warn whenever it assumes undefined behaviour won't happen.
'Warning, you have undefined behavior', let the programmer decide what the intent of the section is and fix it.