parser.c (cp_parser_postfix_expression): Fix flags passed to build_new_method_call.
authorJason Merrill <jason@redhat.com>
Thu, 14 Apr 2011 15:00:24 +0000 (11:00 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 14 Apr 2011 15:00:24 +0000 (11:00 -0400)
* parser.c (cp_parser_postfix_expression): Fix flags passed to
build_new_method_call.
* semantics.c (finish_call_expr): Likewise.

From-SVN: r172435

gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/cp/semantics.c

index 64ea98e1febea51bf99f21f0b02ba6929ae870af..33502e5dab694ec9fc691bc1fe16ee84c98636bd 100644 (file)
@@ -1,5 +1,9 @@
 2011-04-14  Jason Merrill  <jason@redhat.com>
 
+       * parser.c (cp_parser_postfix_expression): Fix flags passed to
+       build_new_method_call.
+       * semantics.c (finish_call_expr): Likewise.
+
        PR c++/48531
        * init.c (build_value_init_noctor): Check complain consistently.
 
index 17f5850f894909596d45ef0be776d638ef66dfcd..7ffa8ba2a322c7bc388c0507bb7506877c65b620 100644 (file)
@@ -5054,7 +5054,8 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p, bool cast_p,
                    = (build_new_method_call
                       (instance, fn, &args, NULL_TREE,
                        (idk == CP_ID_KIND_QUALIFIED
-                        ? LOOKUP_NONVIRTUAL : LOOKUP_NORMAL),
+                        ? LOOKUP_NORMAL|LOOKUP_NONVIRTUAL
+                        : LOOKUP_NORMAL),
                        /*fn_p=*/NULL,
                        tf_warning_or_error));
                  }
index c763f813c5c65d133575423d696952682b896f0b..738375cf0312f5f6757d98bb39b19cfb7bf978f4 100644 (file)
@@ -2114,7 +2114,8 @@ finish_call_expr (tree fn, VEC(tree,gc) **args, bool disallow_virtual,
 
       result = build_new_method_call (object, fn, args, NULL_TREE,
                                      (disallow_virtual
-                                      ? LOOKUP_NONVIRTUAL : 0),
+                                      ? LOOKUP_NORMAL|LOOKUP_NONVIRTUAL
+                                      : LOOKUP_NORMAL),
                                      /*fn_p=*/NULL,
                                      complain);
     }