diff options
Diffstat (limited to 'gcc/cp/error.c')
-rw-r--r-- | gcc/cp/error.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/gcc/cp/error.c b/gcc/cp/error.c index b50704a3ae4..f4232075119 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_("<missing>")); @@ -460,8 +466,11 @@ dump_type (tree t, int flags) break; case UNBOUND_CLASS_TEMPLATE: - dump_type (TYPE_CONTEXT (t), flags); - pp_cxx_colon_colon (cxx_pp); + if (! (flags & TFF_UNQUALIFIED_NAME)) + { + dump_type (TYPE_CONTEXT (t), flags); + pp_cxx_colon_colon (cxx_pp); + } pp_cxx_ws_string (cxx_pp, "template"); dump_type (DECL_NAME (TYPE_NAME (t)), flags); break; @@ -941,7 +950,9 @@ dump_decl (tree t, int flags) break; case SCOPE_REF: - pp_expression (cxx_pp, t); + dump_type (TREE_OPERAND (t, 0), flags); + pp_string (cxx_pp, "::"); + dump_decl (TREE_OPERAND (t, 1), flags|TFF_UNQUALIFIED_NAME); break; case ARRAY_REF: @@ -2213,6 +2224,9 @@ dump_expr (tree t, int flags) break; case SCOPE_REF: + dump_decl (t, flags); + break; + case EXPR_PACK_EXPANSION: case TYPEID_EXPR: case MEMBER_REF: |