diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2018-01-17 17:44:42 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2018-01-17 17:44:42 +0000 |
commit | 988a1f54553bc8619df6222d3e44735c94ac5ec7 (patch) | |
tree | c397b95b395861f295f9a8ea7e75f325caf8e7d8 | |
parent | 4a3d199b68c93fac89d002cd120f63a0e548eef7 (diff) | |
download | gcc-988a1f54553bc8619df6222d3e44735c94ac5ec7.tar.gz |
PR c++/81067 - redundant NULL warning.
* call.c (convert_like_real): Restore null_node handling.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@256803 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/call.c | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index ff09fe32fdb..bdcac476385 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,10 @@ 2018-01-17 Jason Merrill <jason@redhat.com> + PR c++/81067 - redundant NULL warning. + * call.c (convert_like_real): Restore null_node handling. + +2018-01-17 Jason Merrill <jason@redhat.com> + PR c++/81843 - ICE with variadic member template. PR c++/72801 * pt.c (unify_pack_expansion): Don't try to deduce enclosing diff --git a/gcc/cp/call.c b/gcc/cp/call.c index f5542850cea..1f326d5c1ad 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -6804,6 +6804,12 @@ convert_like_real (conversion *convs, tree expr, tree fn, int argnum, if (type_unknown_p (expr)) expr = instantiate_type (totype, expr, complain); + if (expr == null_node + && INTEGRAL_OR_UNSCOPED_ENUMERATION_TYPE_P (totype)) + /* If __null has been converted to an integer type, we do not want to + continue to warn about uses of EXPR as an integer, rather than as a + pointer. */ + expr = build_int_cst (totype, 0); return expr; case ck_ambig: /* We leave bad_p off ck_ambig because overload resolution considers |