https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96550
--- Comment #11 from Roger Wolff <R.E.Wolff at BitWizard dot nl> --- 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.