https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65168

--- Comment #13 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Author: ppalka
Date: Sat Jun 13 16:11:15 2015
New Revision: 224455

URL: https://gcc.gnu.org/viewcvs?rev=224455&root=gcc&view=rev
Log:
Emit -Waddress warnings for comparing address of reference against NULL

gcc/c-family/ChangeLog:

        PR c++/65168
        * c-common.c (c_common_truthvalue_conversion): Warn when
        converting an address of a reference to a truth value.

gcc/cp/ChangeLog:

        PR c++/65168
        * typeck.c (cp_build_binary_op): Warn when comparing an address
        of a reference against NULL.

gcc/testsuite/ChangeLog:

        PR c++/65168
        g++.dg/warn/Walways-true-3.C: New test.



Added:
    trunk/gcc/testsuite/g++.dg/warn/Walways-true-3.C
Modified:
    trunk/gcc/c-family/ChangeLog
    trunk/gcc/c-family/c-common.c
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/typeck.c
    trunk/gcc/testsuite/ChangeLog

Reply via email to