Commit 38a15b40 by Dodji Seketeli Committed by Dodji Seketeli

re PR c++/42218 (Broken diagnostic: 'tree_vec' not supported by pp_c_expression)

Fix PR c++/42218

gcc/cp/ChangeLog:
	PR c++/42218
	* cxx-pretty-print.c (pp_cxx_unqualified_id): Print only innermost
	template arguments.

gcc/testsuite/ChangeLog:
	PR c++/42218
	* g++.dg/other/error33.C: New test.

From-SVN: r154972
parent 25a31608
2009-12-04 Dodji Seketeli <dodji@redhat.com>
PR c++/42218
* cxx-pretty-print.c (pp_cxx_unqualified_id): Print only innermost
template arguments.
2009-12-03 Jason Merrill <jason@redhat.com>
PR c++/41611
......
......@@ -203,7 +203,8 @@ pp_cxx_unqualified_id (cxx_pretty_printer *pp, tree t)
if (CLASS_TYPE_P (t) && CLASSTYPE_USE_TEMPLATE (t))
{
pp_cxx_begin_template_argument_list (pp);
pp_cxx_template_argument_list (pp, CLASSTYPE_TI_ARGS (t));
pp_cxx_template_argument_list (pp, INNERMOST_TEMPLATE_ARGS
(CLASSTYPE_TI_ARGS (t)));
pp_cxx_end_template_argument_list (pp);
}
break;
......
2009-12-04 Dodji Seketeli <dodji@redhat.com>
PR c++/42218
* g++.dg/other/error33.C: New test.
2009-12-03 Jason Merrill <jason@redhat.com>
* g++.dg/abi/guard2.C: Run on *-*-linux* rather than x86-*-*
......
// Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin: PR c++/42218
// { dg-do compile }
template<int> struct A
{
template<int> struct B;
};
int i = A<0>::B<0>::X::Y; // { dg-error "'A<0>::B<0>::X' has not been declared" }
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