[Bug c/69835] [6 Regression] -Wnonnull diagnoses parameter comparisons with NULL even when those could have changed
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69835 Jakub Jelinek changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #3 from Jakub Jelinek --- Fixed.
[Bug c/69835] [6 Regression] -Wnonnull diagnoses parameter comparisons with NULL even when those could have changed
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69835 --- Comment #2 from Jakub Jelinek --- Author: jakub Date: Tue Feb 16 20:46:17 2016 New Revision: 233472 URL: https://gcc.gnu.org/viewcvs?rev=233472=gcc=rev Log: PR c/69835 * common.opt (Wnonnull-compare): New warning. * doc/invoke.texi (-Wnonnull): Remove text about comparison of arguments against NULL. (-Wnonnull-compare): Document. * Makefile.in (OBJS): Add gimple-ssa-nonnull-compare.o. * tree-pass.h (make_pass_warn_nonnull_compare): Declare. * passes.def (pass_warn_nonnull_compare): Add. * gimple-ssa-nonnull-compare.c: New file. c-family/ * c.opt (Wnonnull-compare): Enable for -Wall. c/ * c-typeck.c (build_binary_op): Revert 2015-09-09 change. cp/ * typeck.c (cp_build_binary_op): Revert 2015-09-09 change. testsuite/ * c-c++-common/nonnull-1.c: Use -Wnonnull-compare instead of -Wnonnull in dg-options. * c-c++-common/nonnull-2.c: New test. Added: trunk/gcc/gimple-ssa-nonnull-compare.c trunk/gcc/testsuite/c-c++-common/nonnull-2.c Modified: trunk/gcc/ChangeLog trunk/gcc/Makefile.in trunk/gcc/c-family/ChangeLog trunk/gcc/c-family/c.opt trunk/gcc/c/ChangeLog trunk/gcc/c/c-typeck.c trunk/gcc/common.opt trunk/gcc/cp/ChangeLog trunk/gcc/cp/typeck.c trunk/gcc/doc/invoke.texi trunk/gcc/passes.def trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/c-c++-common/nonnull-1.c trunk/gcc/tree-pass.h
[Bug c/69835] [6 Regression] -Wnonnull diagnoses parameter comparisons with NULL even when those could have changed
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69835 --- Comment #1 from Jakub Jelinek --- Created attachment 37703 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37703=edit gcc6-pr69835.patch Untested fix, which moves the warning from the FE to early uninit pass (i.e. shortly after going into SSA).
[Bug c/69835] [6 Regression] -Wnonnull diagnoses parameter comparisons with NULL even when those could have changed
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69835 Jakub Jelinek changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed||2016-02-16 Target Milestone|--- |6.0 Ever confirmed|0 |1