summaryrefslogtreecommitdiff
path: root/gcc/cp/init.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2004-06-10 18:28:53 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2004-06-10 18:28:53 +0000
commitd1842279b37497a076438c5f52eca86bb94434fd (patch)
treea5a8617488c066ac09291b56eec8860859a2ef95 /gcc/cp/init.c
parent51dade958d23ac0d75ee1ababd429ae1e56b8f15 (diff)
downloadgcc-d1842279b37497a076438c5f52eca86bb94434fd.tar.gz
PR c++/15875
Revert: 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> * init.c (build_offset_ref): Build SCOPE_REF with non-null TREE_TYPE for non-dependent names. * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82933 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/init.c')
-rw-r--r--gcc/cp/init.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index 5f0872e80cd..1c003566108 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -1368,7 +1368,7 @@ build_offset_ref (tree type, tree name, bool address_p)
if (TREE_CODE (name) == TEMPLATE_DECL)
return name;
- if (dependent_type_p (type) || type_dependent_expression_p (name))
+ if (processing_template_decl || uses_template_parms (type))
return build_min_nt (SCOPE_REF, type, name);
if (TREE_CODE (name) == TEMPLATE_ID_EXPR)
@@ -1450,14 +1450,6 @@ build_offset_ref (tree type, tree name, bool address_p)
return error_mark_node;
}
- if (processing_template_decl)
- {
- if (TREE_CODE (orig_name) == TEMPLATE_ID_EXPR)
- return build_min (SCOPE_REF, TREE_TYPE (member), type, orig_name);
- else
- return build_min (SCOPE_REF, TREE_TYPE (member), type, name);
- }
-
if (TREE_CODE (member) == TYPE_DECL)
{
TREE_USED (member) = 1;