summaryrefslogtreecommitdiff
path: root/gcc/cp/error.c
diff options
context:
space:
mode:
authorlerdsuwa <lerdsuwa@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-18 12:37:57 +0000
committerlerdsuwa <lerdsuwa@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-18 12:37:57 +0000
commitc3c0139b3e0c6e630f52ac487c792847c050f83d (patch)
treed79f98c004fe4bbd1222c18f019ba3f4157791c8 /gcc/cp/error.c
parentb96a37b62f36b5f91acb55b740468be45e41d300 (diff)
downloadgcc-c3c0139b3e0c6e630f52ac487c792847c050f83d.tar.gz
PR c++/13092
* init.c (build_offset_ref): Build SCOPE_REF with non-null TREE_TYPE for non-dependent names. * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF. * pt.c (type_dependent_expression_p): Handle SCOPE_REF with unknown_type_node as its TREE_TYPE. * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK. * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression. (dump_expr) <SCOPE_REF case>: Likewise. * g++.dg/template/non-dependent7.C: New test. * g++.dg/template/non-dependent8.C: Likewise. * g++.dg/template/non-dependent9.C: Likewise. * g++.dg/template/non-dependent10.C: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84889 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/error.c')
-rw-r--r--gcc/cp/error.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index 6d579630400..6fa99a7a801 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -764,9 +764,7 @@ dump_decl (tree t, int flags)
break;
case SCOPE_REF:
- dump_decl (TREE_OPERAND (t, 0), flags & ~TFF_DECL_SPECIFIERS);
- pp_colon_colon (cxx_pp);
- dump_decl (TREE_OPERAND (t, 1), flags);
+ pp_expression (cxx_pp, t);
break;
case ARRAY_REF:
@@ -1708,9 +1706,7 @@ dump_expr (tree t, int flags)
break;
case SCOPE_REF:
- dump_type (TREE_OPERAND (t, 0), flags);
- pp_cxx_colon_colon (cxx_pp);
- dump_expr (TREE_OPERAND (t, 1), flags | TFF_EXPR_IN_PARENS);
+ pp_expression (cxx_pp, t);
break;
case CAST_EXPR: