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/c-family/c-common.c | |
parent | 7d54cccad332074d5fb81123796239f0f61b11a7 (diff) | |
download | gcc-d6f1cf644c45b76a27b6a6869dedaa030e3c7570.tar.gz |
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/c-family/c-common.c')
-rw-r--r-- | gcc/c-family/c-common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c index 2028e93b4d7..813212cc21d 100644 --- a/gcc/c-family/c-common.c +++ b/gcc/c-family/c-common.c @@ -5595,7 +5595,7 @@ check_nonnull_arg (void *ctx, tree param, unsigned HOST_WIDE_INT param_num) if (param_num == 0) { warned = warning_at (loc, OPT_Wnonnull, - "%qs pointer null", "this"); + "%qs pointer is null", "this"); if (warned && pctx->fndecl) inform (DECL_SOURCE_LOCATION (pctx->fndecl), "in a call to non-static member function %qD", |