Skip to content
Snippets Groups Projects
Commit c7f16806 authored by Jason Merrill's avatar Jason Merrill
Browse files

c++: only strip conversions for deduction [PR118632]

In r15-2761 I changed unify to always strip IMPLICIT_CONV_EXPR from PARM.
In this testcase that leads to comparing nullptr to (int*)0, and failing
because they aren't the same.  Let's only strip conversions if we're
actually going to try to deduce template arguments.

While we're at it, let's move this after the early exits.

And with this adjustment we can remove the workaround for mangle57.C.

	PR c++/118632

gcc/cp/ChangeLog:

	* pt.cc (unify): Only strip conversion if deducible_expression.

gcc/testsuite/ChangeLog:

	* g++.dg/cpp0x/nontype7.C: New test.
parent 019fe9c4
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment