diff options
author | Mark Mitchell <mark@codesourcery.com> | 2003-07-16 00:09:45 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2003-07-16 00:09:45 +0000 |
commit | 10b1d5e751023bfe9b2e34befae33ed9cd6bd64c (patch) | |
tree | 3322e2ccf0fe461c605621cdc18981801b890fe3 /gcc/cp/semantics.c | |
parent | b0e3f7ec306dafdaf554f5b3eea03de75cec2a84 (diff) | |
download | gcc-10b1d5e751023bfe9b2e34befae33ed9cd6bd64c.zip gcc-10b1d5e751023bfe9b2e34befae33ed9cd6bd64c.tar.gz gcc-10b1d5e751023bfe9b2e34befae33ed9cd6bd64c.tar.bz2 |
cp-tree.def (LOOKUP_EXPR): Remove.
* cp-tree.def (LOOKUP_EXPR): Remove.
* cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT.
(LOOKUP_EXPR_GLOBAL): Remove.
(get_bindings): Remove.
(is_aggr_type_2): Remove.
* call.c (resolved_scoped_fn_name): Remove support for
LOOKUP_EXPR.
* decl.c (grokfndecl): Likewise.
(grokdeclarator): Likewise.
* error.c (dump_decl): Likewise.
(dump_expr): Likewise.
* friend.c (do_friend): Likewise.
* init.c (build_offset_ref): Likewise.
* lex.c (unqualified_fn_lookup_error): Use pedwarn. Do not create
LOOKUP_EXPRs
* mangle.c (write_expression): Remove support for LOOKUP_EXPR.
* parser.c (cp_parser_postfix_expression): Modify Koenig lookup
test.
* pt.c (get_bindings): Give it internal linkage.
(check_explicit_specialization): Remove support for LOOKUP_EXPR.
(lookup_template_function): Likewise.
(for_each_tempalte_parm_r): Likewise.
(tsubst_decl): Likewise.
(tsubst_qualified_id): Handle template template parameters.
(tsubst_copy): Remove support for LOOKUP_EXPR.
(tsubst_copy_and_build): Likewise.
(most_general_template): Likewise.
(value_dependent_expression_p): Likewise.
(type_dependent_expression_p): Note that IDENTIFIER_NODEs are
always dependent.
* semantics.c (perform_koenig_lookup): Do not create
IDENTIFIER_NODEs.
(finish_fname): Likewise.
(finish_id_expression): Likewise.
* tree.c (is_aggr_type_2): Remove.
From-SVN: r69427
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r-- | gcc/cp/semantics.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 9a9ae20..0278385 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -1512,7 +1512,7 @@ perform_koenig_lookup (tree fn, tree args) fn = unqualified_fn_lookup_error (identifier); } else - fn = build_min_nt (LOOKUP_EXPR, identifier); + fn = identifier; return fn; } @@ -1819,7 +1819,7 @@ finish_fname (tree id) decl = fname_decl (C_RID_CODE (id), id); if (processing_template_decl) - decl = build_min_nt (LOOKUP_EXPR, DECL_NAME (decl)); + decl = DECL_NAME (decl); return decl; } @@ -2372,12 +2372,6 @@ finish_id_expression (tree id_expression, An id-expression is type-dependent if it contains an identifier that was declared with a dependent type. - As an optimization, we could choose not to create a - LOOKUP_EXPR for a name that resolved to a local variable in - the template function that we are currently declaring; such a - name cannot ever resolve to anything else. If we did that we - would not have to look up these names at instantiation time. - The standard is not very specific about an id-expression that names a set of overloaded functions. What if some of them have dependent types and some of them do not? Presumably, @@ -2469,8 +2463,8 @@ finish_id_expression (tree id_expression, constant when things are instantiated. */ if (constant_expression_p) *non_constant_expression_p = true; - /* Create a LOOKUP_EXPR for other unqualified names. */ - return build_min_nt (LOOKUP_EXPR, id_expression); + *idk = CP_ID_KIND_UNQUALIFIED_DEPENDENT; + return id_expression; } /* Only certain kinds of names are allowed in constant |