Trunk produces a broken diagnostic for the following code snippet: ======================================== template<typename T> void foo(T, T); void bar(void* p) { foo(0,p); } ======================================== bug.cc: In function 'void bar(void*)': bug.cc:5:10: error: no matching function for call to 'foo(int, void*&)' bug.cc:5:10: note: candidate is: bug.cc:1:27: note: template<class T> void foo(T, T) bug.cc:1:27: note: template argument deduction/substitution failed: bug.cc:5:10: note: conflicting deductions for parameter 'T' ('int' and '#'pointer_type' not supported by dump_expr#<expression error>')
Mine, this is caused by PR51230, for sure.
Author: paolo Date: Thu Dec 1 09:34:43 2011 New Revision: 181876 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181876 Log: /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. Added: trunk/gcc/testsuite/g++.dg/template/error47.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/pt.c trunk/gcc/testsuite/ChangeLog
Fixed.