From: Marek Polacek Date: Thu, 19 May 2016 20:23:52 +0000 (+0000) Subject: re PR c++/71075 (Broken diagnostic: 'integer_cst' not supported by 'dump_decl') X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2a5569fad3cd964d1c8456b07a411189695ad275;p=gcc.git 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 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 5c38aaf9b57..dcd660f627c 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2016-05-19 Marek Polacek + + PR c++/71075 + * pt.c (unify_template_argument_mismatch): Use %qE instead of %qD. + 2016-05-19 Jason Merrill PR c++/10200 diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 39085927e86..2bba571b97e 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -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; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1630598fe31..41668728f07 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2016-05-19 Marek Polacek + + PR c++/71075 + * g++.dg/diagnostic/pr71075.C: New test. + 2016-05-19 David Malcolm PR c++/71184 diff --git a/gcc/testsuite/g++.dg/diagnostic/pr71075.C b/gcc/testsuite/g++.dg/diagnostic/pr71075.C new file mode 100644 index 00000000000..6bb1e68e0b7 --- /dev/null +++ b/gcc/testsuite/g++.dg/diagnostic/pr71075.C @@ -0,0 +1,8 @@ +// PR c++/71075 + +template struct A {}; +template void foo(A) {} +int main() { + foo(A()); // { dg-error "no matching" } +// { dg-message "template argument .2. does not match .1." "" { target *-*-* } 6 } +}