https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111087
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Because the warning is not flow dependent. So even things like: const class1 *a = nullptr; a != nullptr && a->method1(); Will also warn.