re PR c++/38888 ([C++0x] badly readable diagnostic output with variadic templates)

PR c++/38888
	* error.c (dump_template_bindings): Wrap argument packs in {}.

From-SVN: r152925
This commit is contained in:
Jason Merrill 2009-10-17 02:11:21 -04:00 committed by Jason Merrill
parent 6c3f4949ee
commit af16209f32
2 changed files with 10 additions and 1 deletions

View File

@ -1,5 +1,8 @@
2009-10-15 Jason Merrill <jason@redhat.com>
PR c++/38888
* error.c (dump_template_bindings): Wrap argument packs in {}.
PR c++/38798
* parser.c (CP_PARSER_FLAGS_NO_TYPE_DEFINITIONS): New.
(cp_parser_type_specifier): Don't try to parse a class-specifier

View File

@ -311,7 +311,13 @@ dump_template_bindings (tree parms, tree args, VEC(tree,gc)* typenames)
pp_equal (cxx_pp);
pp_cxx_whitespace (cxx_pp);
if (arg)
dump_template_argument (arg, TFF_PLAIN_IDENTIFIER);
{
if (ARGUMENT_PACK_P (arg))
pp_cxx_left_brace (cxx_pp);
dump_template_argument (arg, TFF_PLAIN_IDENTIFIER);
if (ARGUMENT_PACK_P (arg))
pp_cxx_right_brace (cxx_pp);
}
else
pp_string (cxx_pp, M_("<missing>"));