aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/error.c')
-rw-r--r--gcc/cp/error.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index f371b48d1d6..398d812cd11 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -1324,6 +1324,12 @@ dump_expr (tree t, int flags)
if (t == 0)
return;
+ if (STATEMENT_CLASS_P (t))
+ {
+ pp_cxx_identifier (cxx_pp, "<statement>");
+ return;
+ }
+
switch (TREE_CODE (t))
{
case VAR_DECL:
@@ -1762,10 +1768,6 @@ dump_expr (tree t, int flags)
dump_decl (TEMPLATE_PARM_DECL (t), flags & ~TFF_DECL_SPECIFIERS);
break;
- case SCOPE_REF:
- pp_expression (cxx_pp, t);
- break;
-
case CAST_EXPR:
if (TREE_OPERAND (t, 0) == NULL_TREE
|| TREE_CHAIN (TREE_OPERAND (t, 0)))
@@ -1893,6 +1895,18 @@ dump_expr (tree t, int flags)
dump_expr (TREE_OPERAND (t, 0), flags);
break;
+ case VA_ARG_EXPR:
+ pp_cxx_va_arg_expression (cxx_pp, t);
+ break;
+
+ case SCOPE_REF:
+ case TYPEID_EXPR:
+ case DELETE_EXPR:
+ case VEC_DELETE_EXPR:
+ case MODOP_EXPR:
+ pp_expression (cxx_pp, t);
+ break;
+
/* This list is incomplete, but should suffice for now.
It is very important that `sorry' does not call
`report_error_function'. That could cause an infinite loop. */