re PR c++/69902 (Bogus -Wnonnull-compare for: dynamic_cast<T*>(&ref) == nullptr)
authorJakub Jelinek <jakub@redhat.com>
Tue, 23 Feb 2016 12:58:53 +0000 (13:58 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 23 Feb 2016 12:58:53 +0000 (13:58 +0100)
commite67bf044ae4ad40fd0cc24f428ca9758cd920f97
treea3bc76f90dc7fe653979363fdc0f18eeeb440730
parentf1a62b6fa8c1e5305d887559575506755f8aab69
re PR c++/69902 (Bogus -Wnonnull-compare for: dynamic_cast<T*>(&ref) == nullptr)

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.

From-SVN: r233631
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/Wnonnull-compare-5.C [new file with mode: 0644]