Commit a95888bb by Paolo Carlini Committed by Paolo Carlini

re PR c++/51367 (Broken diagnostic: 'pointer_type' not supported by dump_expr)

/cp
2011-12-01  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/51367
	* pt.c (unify_inconsistency): Use either %qT or %qE depending on
	whether parm is a type or non-type parameter.

/cp
2011-12-01  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/51367
	* g++.dg/template/error47.C: New.

From-SVN: r181876
parent 12f300a8
2011-12-01 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/51367
* pt.c (unify_inconsistency): Use either %qT or %qE depending on
whether parm is a type or non-type parameter.
2011-11-30 Jason Merrill <jason@redhat.com> 2011-11-30 Jason Merrill <jason@redhat.com>
PR c++/51009 PR c++/51009
......
...@@ -5501,9 +5501,16 @@ static int ...@@ -5501,9 +5501,16 @@ static int
unify_inconsistency (bool explain_p, tree parm, tree first, tree second) unify_inconsistency (bool explain_p, tree parm, tree first, tree second)
{ {
if (explain_p) if (explain_p)
inform (input_location, {
" conflicting deductions for parameter %qE (%qE and %qE)", if (TYPE_P (parm))
parm, first, second); inform (input_location,
" deduced conflicting types for parameter %qT (%qT and %qT)",
parm, first, second);
else
inform (input_location,
" deduced conflicting values for non-type parameter "
"%qE (%qE and %qE)", parm, first, second);
}
return 1; return 1;
} }
......
2011-12-01 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/51367
* g++.dg/template/error47.C: New.
2011-11-30 Jason Merrill <jason@redhat.com> 2011-11-30 Jason Merrill <jason@redhat.com>
PR c++/51009 PR c++/51009
......
// PR c++/51367
template<typename T> void foo(T, T); // { dg-message "template" }
void bar(void* p)
{
foo(0, p); // { dg-error "no matching" }
}
// { dg-message "candidate|parameter 'T' ('int' and 'void*')" { target *-*-* } 7 }
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