* parser.c (cp_parser_postfix_expression): Fix flags passed to
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 14 Apr 2011 15:00:24 +0000 (15:00 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 14 Apr 2011 15:00:24 +0000 (15:00 +0000)
build_new_method_call.
* semantics.c (finish_call_expr): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172435 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 64ea98e..33502e5 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 17f5850..7ffa8ba 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 c763f81..738375c 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);
     }