diff options
Diffstat (limited to 'gcc/cp/error.c')
-rw-r--r-- | gcc/cp/error.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/cp/error.c b/gcc/cp/error.c index d4b1ff859a2..aa075ee1a64 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -459,7 +459,8 @@ dump_type (t, flags) break; } case TYPENAME_TYPE: - output_add_string (scratch_buffer, "typename "); + if (IMPLICIT_TYPENAME_P (t)) + output_add_string (scratch_buffer, "typename "); dump_typename (t, flags); break; @@ -1734,7 +1735,7 @@ dump_expr (t, flags) break; case CONVERT_EXPR: - if (VOID_TYPE_P (TREE_TYPE (t))) + if (TREE_TYPE (t) && VOID_TYPE_P (TREE_TYPE (t))) { print_left_paren (scratch_buffer); dump_type (TREE_TYPE (t), flags); |