Re:Useful GCC warning options not enabled by -Wall -Wextra
by zakk on Wednesday October 04, 2017 @12:41PM
(#15401766)
I wonder why -Wnull-dereference is not default.
[ Parent
| on HN ]
Re:Useful GCC warning options not enabled by -Wall -Wextra
by maxlybbert on Wednesday October 04, 2017 @12:51PM
(#15401852)
I would guess "because people complain when it gives warnings related to macros." That's almost always the answer, especially for C.
Re:Useful GCC warning options not enabled by -Wall -Wextra
by rocqua on Wednesday October 04, 2017 @02:53PM
(#15403284)
I wonder the same. Especially because this might be the same code that deletes null-checks as an 'optimization due to undefined behavior' as discussed here [1].
I recall a bug report with quite the flame war in it, but couldn't find it.