This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/70295] [6 Regression] bogus -Wnonnull-compare for "dynamic_cast<const FuSelection *>(this) != nullptr"


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

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Tue Mar 22 08:11:14 2016
New Revision: 234392

URL: https://gcc.gnu.org/viewcvs?rev=234392&root=gcc&view=rev
Log:
        PR c++/70295
        * gimplify.c (gimplify_modify_expr): Call gimple_set_no_warning
        on assign if (*from_p) is a comparison, set it to
        TREE_NO_WARNING (*from_p).

        * c-c++-common/nonnull-1.c (func): Remove parens around cp4 != 0.
        (func2): New function for cond with parens, xfail warning for c++.
        * g++.dg/warn/Wnonnull-compare-8.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/warn/Wnonnull-compare-8.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/gimplify.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/c-c++-common/nonnull-1.c

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]