https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109590
Xi Ruoyao <xry111 at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |xry111 at gcc dot gnu.org --- Comment #3 from Xi Ruoyao <xry111 at gcc dot gnu.org> --- -Wnull-dereference is known to give false warnings in many cases (the doc says "the precision of the warnings depends on the optimization options used" and I remember there are several recent PRs complaining it). So it's not suitable for -Wall or -Wextra. Maybe we can imply -Wnull-dereference with -Warray-bounds=2, but -Warray-bounds=2 is not enabled by -Wall or -Wextra as well.