Commit d2edcd70 by Jason Merrill Committed by Jason Merrill

PR c++/81067 - redundant NULL warning.

	* call.c (convert_like_real): Restore null_node handling.

From-SVN: r256803
parent 2625472f
2018-01-17 Jason Merrill <jason@redhat.com> 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++/81843 - ICE with variadic member template.
PR c++/72801 PR c++/72801
* pt.c (unify_pack_expansion): Don't try to deduce enclosing * pt.c (unify_pack_expansion): Don't try to deduce enclosing
......
...@@ -6804,6 +6804,12 @@ convert_like_real (conversion *convs, tree expr, tree fn, int argnum, ...@@ -6804,6 +6804,12 @@ convert_like_real (conversion *convs, tree expr, tree fn, int argnum,
if (type_unknown_p (expr)) if (type_unknown_p (expr))
expr = instantiate_type (totype, expr, complain); 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; return expr;
case ck_ambig: case ck_ambig:
/* We leave bad_p off ck_ambig because overload resolution considers /* We leave bad_p off ck_ambig because overload resolution considers
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment