https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86177
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> --- Why add it there and not to every other warning option that depends on interprocedural analysis and inlining? If the dereference and the null pointer are in separate files, then of course the compiler can't warn. That's just how C++ works.