Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I wonder why -Wnull-dereference is not default.


I would guess "because people complain when it gives warnings related to macros." That's almost always the answer, especially for C.


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.

[1] https://kb.isc.org/article/AA-01167




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: