diff options
author | Mark Mitchell <mark@codesourcery.com> | 2004-03-19 07:27:30 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2004-03-19 07:27:30 +0000 |
commit | 26bcf8fc16a06d4fe16ac25ce79739e2e6cb7445 (patch) | |
tree | 78c8fee7aeff0e01a8b8cc9aef49a891bccb39a7 /gcc/cp/parser.c | |
parent | ff3fcb8a50f89eff597c9d5e8f8d1cf6e31b809b (diff) | |
download | gcc-26bcf8fc16a06d4fe16ac25ce79739e2e6cb7445.zip gcc-26bcf8fc16a06d4fe16ac25ce79739e2e6cb7445.tar.gz gcc-26bcf8fc16a06d4fe16ac25ce79739e2e6cb7445.tar.bz2 |
semantics.c (finish_pseudo_destructor_expr): Allow differing cv-qualification between the type named by the...
* semantics.c (finish_pseudo_destructor_expr): Allow differing
cv-qualification between the type named by the
pseudo-destructor-name and the object-type.
* search.c (accessible_base_p): Handle non-proper bases.
* name-lookup.c (do_nonmember_using_decl): If a using declaration
refers to a single overloaded function, set the type of the
function.
* tree.c (lvalue_type): Simplify.
* typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
unknown type.
(build_unary_op): Handle OVERLOADs with known types.
* decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
function templates.
* parser.c (cp_parser_postfix_expression): Handle the use of
"typename" in non-dependent contexts. Convert appropriately when
when using a qualified name after "->" or ".".
* call.c (conditional_conversion): Honor the requirement that some
conversions refer to the original object.
* g++.dg/expr/dtor2.C: New test.
* g++.dg/lookup/anon4.C: New test.
* g++.dg/overload/using1.C: New test.
* g++.dg/template/lookup7.C: New test.
* g++.dg/template/typename6.C: New test.
* g++.dg/expr/cond6.C: New test.
From-SVN: r79671
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r-- | gcc/cp/parser.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 0dc63cd..c05e375 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -3629,10 +3629,16 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p) /* If that didn't work, try an identifier. */ if (!cp_parser_parse_definitely (parser)) id = cp_parser_identifier (parser); + /* If we look up a template-id in a non-dependent qualifying + scope, there's no need to create a dependent type. */ + if (TREE_CODE (id) == TYPE_DECL + && !dependent_type_p (parser->scope)) + type = TREE_TYPE (id); /* Create a TYPENAME_TYPE to represent the type to which the functional cast is being performed. */ - type = make_typename_type (parser->scope, id, - /*complain=*/1); + else + type = make_typename_type (parser->scope, id, + /*complain=*/1); postfix_expression = cp_parser_functional_cast (parser, type); } @@ -3971,6 +3977,9 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p) parser->qualifying_scope = NULL_TREE; parser->object_scope = NULL_TREE; } + if (scope && name && BASELINK_P (name)) + adjust_result_of_qualified_name_lookup + (name, BINFO_TYPE (BASELINK_BINFO (name)), scope); postfix_expression = finish_class_member_access_expr (postfix_expression, name); } |