re PR c++/71075 (Broken diagnostic: 'integer_cst' not supported by 'dump_decl')

PR c++/71075
	* pt.c (unify_template_argument_mismatch): Use %qE instead of %qD.

	* g++.dg/diagnostic/pr71075.C: New test.

From-SVN: r236487
This commit is contained in:
Marek Polacek 2016-05-19 20:23:52 +00:00 committed by Marek Polacek
parent a7dd5069bb
commit 2a5569fad3
4 changed files with 19 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2016-05-19 Marek Polacek <polacek@redhat.com>
PR c++/71075
* pt.c (unify_template_argument_mismatch): Use %qE instead of %qD.
2016-05-19 Jason Merrill <jason@redhat.com>
PR c++/10200

View file

@ -6165,7 +6165,7 @@ unify_template_argument_mismatch (bool explain_p, tree parm, tree arg)
{
if (explain_p)
inform (input_location,
" template argument %qE does not match %qD", arg, parm);
" template argument %qE does not match %qE", arg, parm);
return 1;
}

View file

@ -1,3 +1,8 @@
2016-05-19 Marek Polacek <polacek@redhat.com>
PR c++/71075
* g++.dg/diagnostic/pr71075.C: New test.
2016-05-19 David Malcolm <dmalcolm@redhat.com>
PR c++/71184

View file

@ -0,0 +1,8 @@
// PR c++/71075
template<typename T, int I> struct A {};
template<typename T> void foo(A<T,1>) {}
int main() {
foo(A<int,2>()); // { dg-error "no matching" }
// { dg-message "template argument .2. does not match .1." "" { target *-*-* } 6 }
}