aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/typeck2.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2016-02-10 15:34:52 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2016-02-10 15:34:52 +0000
commit2066d1f0c72b54080a7d65fe338197d1559d5275 (patch)
treec89456c79620b96874951134be2fdb0acd5caa62 /gcc/cp/typeck2.c
parent268df867b4637b14abc568b5acfc5a6195da6181 (diff)
PR c++/10200
* parser.c (cp_parser_lookup_name): When looking for a template after . or ->, only consider class templates. (cp_parser_postfix_dot_deref_expression): Handle the current instantiation. Remember a dependent object expression. * typeck2.c (build_x_arrow): Handle the current instantiation. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233277 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/typeck2.c')
-rw-r--r--gcc/cp/typeck2.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c
index 2a76c96c7d4..54a432f256f 100644
--- a/gcc/cp/typeck2.c
+++ b/gcc/cp/typeck2.c
@@ -1694,7 +1694,10 @@ build_x_arrow (location_t loc, tree expr, tsubst_flags_t complain)
if (processing_template_decl)
{
- if (type_dependent_expression_p (expr))
+ if (type && TREE_CODE (type) == POINTER_TYPE
+ && !dependent_scope_p (TREE_TYPE (type)))
+ /* Pointer to current instantiation, don't treat as dependent. */;
+ else if (type_dependent_expression_p (expr))
return build_min_nt_loc (loc, ARROW_EXPR, expr);
expr = build_non_dependent_expr (expr);
}