diff options
Diffstat (limited to 'gcc/cp/error.c')
-rw-r--r-- | gcc/cp/error.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/gcc/cp/error.c b/gcc/cp/error.c index 42a7ff7..e687ac0 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -971,7 +971,7 @@ dump_decl (tree t, int flags) else if (DECL_INITIAL (t)) dump_expr (DECL_INITIAL (t), flags | TFF_EXPR_IN_PARENS); else - print_identifier (scratch_buffer, "enumerator"); + print_identifier (scratch_buffer, "<enumerator>"); break; case USING_DECL: @@ -1844,9 +1844,19 @@ dump_expr (tree t, int flags) } } } - output_add_character (scratch_buffer, '{'); - dump_expr_list (CONSTRUCTOR_ELTS (t), flags); - output_add_character (scratch_buffer, '}'); + if (TREE_TYPE (t) && !CONSTRUCTOR_ELTS (t)) + { + dump_type (TREE_TYPE (t), 0); + output_add_character (scratch_buffer, '('); + output_add_character (scratch_buffer, ')'); + } + else + { + output_add_character (scratch_buffer, '{'); + dump_expr_list (CONSTRUCTOR_ELTS (t), flags); + output_add_character (scratch_buffer, '}'); + } + break; case OFFSET_REF: |