https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69902
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Tue Feb 23 12:58:53 2016 New Revision: 233631 URL: https://gcc.gnu.org/viewcvs?rev=233631&root=gcc&view=rev Log: PR c++/69902 * fold-const.c (fold_truth_not_expr): Propagate TREE_NO_WARNING when inverting comparison. * g++.dg/warn/Wnonnull-compare-5.C: New test. Added: trunk/gcc/testsuite/g++.dg/warn/Wnonnull-compare-5.C Modified: trunk/gcc/ChangeLog trunk/gcc/fold-const.c trunk/gcc/testsuite/ChangeLog