PR c++/65168 - -Waddress in unevaluated context.
authorJason Merrill <jason@redhat.com>
Thu, 21 Jul 2016 06:05:39 +0000 (02:05 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 21 Jul 2016 06:05:39 +0000 (02:05 -0400)
commit451dcc6693e5e489f9f5bf6ba90cedf8f335ad00
treead779ad8440332e26e9a3100fdf1370031d7ddd3
parente96fe88c518ddc2d8917355d1781de3f8714c348
PR c++/65168 - -Waddress in unevaluated context.

gcc/c-family/
* c-common.c (c_common_truthvalue_conversion): Check
c_inhibit_evaluation_warnings for warning about address of
reference.
gcc/cp/
* typeck.c (cp_truthvalue_conversion): Compare pointers to nullptr.
Don't set c_inhibit_evaluation_warnings.

From-SVN: r238560
gcc/c-family/ChangeLog
gcc/c-family/c-common.c
gcc/cp/ChangeLog
gcc/cp/typeck.c
gcc/testsuite/g++.dg/warn/Waddress-3.C [new file with mode: 0644]
gcc/testsuite/g++.dg/warn/Walways-true-1.C
gcc/testsuite/g++.dg/warn/Walways-true-2.C