From af16209f32e1920919942ae2989fa1b857dfe73c Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Sat, 17 Oct 2009 02:11:21 -0400 Subject: [PATCH] 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 --- gcc/cp/ChangeLog | 3 +++ gcc/cp/error.c | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index d842d8e0414..279ba9e6419 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2009-10-15 Jason Merrill + 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 diff --git a/gcc/cp/error.c b/gcc/cp/error.c index b50704a3ae4..ce5660f4a85 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -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_(""));