aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/semantics.c
diff options
context:
space:
mode:
authorJason Merrill <jason@gcc.gnu.org>2011-04-15 20:28:17 -0400
committerJason Merrill <jason@gcc.gnu.org>2011-04-15 20:28:17 -0400
commitdeb9642d054842041402b44d2062d8a5efa40ce0 (patch)
treef935ef5d5afe9c68c523e956499fa96210611ab5 /gcc/cp/semantics.c
parent5a0f6eba53087e09a70dcb51c80654bb3bf01342 (diff)
downloadgcc-deb9642d054842041402b44d2062d8a5efa40ce0.zip
gcc-deb9642d054842041402b44d2062d8a5efa40ce0.tar.gz
gcc-deb9642d054842041402b44d2062d8a5efa40ce0.tar.bz2
Implement N3271
Implement N3271 * parser.c (cp_convert_range_for): Split into cp_parser_perform_range_for_lookup. (cp_parser_perform_range_for_lookup): New. (cp_parser_range_for_member_function): New. (cp_parser_for_init_statement): Correct error message. * semantics.c (finish_call_expr): Accept COMPONENT_REF. From-SVN: r172531
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r--gcc/cp/semantics.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index b7171ed..793883e 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -2074,6 +2074,22 @@ finish_call_expr (tree fn, VEC(tree,gc) **args, bool disallow_virtual,
make_args_non_dependent (*args);
}
+ if (TREE_CODE (fn) == COMPONENT_REF)
+ {
+ tree member = TREE_OPERAND (fn, 1);
+ if (BASELINK_P (member))
+ {
+ tree object = TREE_OPERAND (fn, 0);
+ return build_new_method_call (object, member,
+ args, NULL_TREE,
+ (disallow_virtual
+ ? LOOKUP_NORMAL | LOOKUP_NONVIRTUAL
+ : LOOKUP_NORMAL),
+ /*fn_p=*/NULL,
+ complain);
+ }
+ }
+
if (is_overloaded_fn (fn))
fn = baselink_for_fns (fn);