From patchwork Thu Apr 14 15:00:59 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Merrill X-Patchwork-Id: 91249 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id ED25FB6EF0 for ; Fri, 15 Apr 2011 01:01:12 +1000 (EST) Received: (qmail 2793 invoked by alias); 14 Apr 2011 15:01:10 -0000 Received: (qmail 2652 invoked by uid 22791); 14 Apr 2011 15:01:09 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, SPF_HELO_PASS, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 14 Apr 2011 15:01:00 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p3EF10fo027309 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 14 Apr 2011 11:01:00 -0400 Received: from [127.0.0.1] ([10.3.113.3]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p3EF0xxu026887 for ; Thu, 14 Apr 2011 11:01:00 -0400 Message-ID: <4DA70C2B.1030904@redhat.com> Date: Thu, 14 Apr 2011 11:00:59 -0400 From: Jason Merrill User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Lightning/1.0b2 Thunderbird/3.1.9 MIME-Version: 1.0 To: gcc-patches List Subject: Minor C++ PATCH to fix lookup flags Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org When reviewing Rodrigo's patch for range-based for, I noticed that the flags for some calls to build_new_method_call were wrong. Fixed thus. Tested x86_64-pc-linux-gnu, applied to trunk. commit ea51123767c2512840f39002d2efac52111d1a7c Author: Jason Merrill Date: Tue Apr 12 22:41:48 2011 -0400 * parser.c (cp_parser_postfix_expression): Fix flags passed to build_new_method_call. * semantics.c (finish_call_expr): Likewise. diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 17f5850..7ffa8ba 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -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)); } diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index c763f81..738375c 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -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); }