diff options
author | Martin Sebor <msebor@redhat.com> | 2021-01-25 12:41:28 -0700 |
---|---|---|
committer | Martin Sebor <msebor@redhat.com> | 2021-01-25 12:41:28 -0700 |
commit | d6f1cf644c45b76a27b6a6869dedaa030e3c7570 (patch) | |
tree | 099882d59ed8681df57417ddd194bc67af3039cf /gcc/tree-ssa-ccp.c | |
parent | 7d54cccad332074d5fb81123796239f0f61b11a7 (diff) | |
download | gcc-d6f1cf644c45b76a27b6a6869dedaa030e3c7570.zip gcc-d6f1cf644c45b76a27b6a6869dedaa030e3c7570.tar.gz gcc-d6f1cf644c45b76a27b6a6869dedaa030e3c7570.tar.bz2 |
PR c++/98646 - spurious -Wnonnull calling a member on the result of static_cast
gcc/c-family/ChangeLog:
PR c++/98646
* c-common.c (check_nonnull_arg): Adjust warning text.
gcc/cp/ChangeLog:
PR c++/98646
* cvt.c (cp_fold_convert): Propagate TREE_NO_WARNING.
gcc/ChangeLog:
PR c++/98646
* tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust warning text.
gcc/testsuite/ChangeLog:
PR c++/98646
* g++.dg/warn/Wnonnull5.C: Adjust text of an expected warning.
* g++.dg/warn/Wnonnull10.C: New test.
* g++.dg/warn/Wnonnull9.C: New test.
Diffstat (limited to 'gcc/tree-ssa-ccp.c')
-rw-r--r-- | gcc/tree-ssa-ccp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c index 965f092..3bfd4a6 100644 --- a/gcc/tree-ssa-ccp.c +++ b/gcc/tree-ssa-ccp.c @@ -3564,7 +3564,7 @@ pass_post_ipa_warn::execute (function *fun) if (argno == 0) { if (warning_at (loc, OPT_Wnonnull, - "%G%qs pointer null", stmt, "this") + "%G%qs pointer is null", stmt, "this") && fndecl) inform (DECL_SOURCE_LOCATION (fndecl), "in a call to non-static member function %qD", |