https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96550
--- Comment #14 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Roger Wolff from comment #11) > Just FYI: I added -Wnull-dereference to my makefile of my real project. It > doesn't trigger a warning in my project when I revert to the buggy code. The > compiler does detect and act upon the null dereference. It will only warn when optimisations are performed, including the -fdelete-null-pointer-checks optimisation. I would expect it to either not act on the null dereference, or act and warn. Please don't change status to FIXED when nothing was changed in GCC, let alone fixed.