From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25135 invoked by alias); 13 Apr 2011 13:46:24 -0000 Received: (qmail 25127 invoked by uid 22791); 13 Apr 2011 13:46:23 -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; Wed, 13 Apr 2011 13:46:15 +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 p3DDkEdK008383 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 13 Apr 2011 09:46:15 -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 p3DDkDJU008554; Wed, 13 Apr 2011 09:46:14 -0400 Message-ID: <4DA5A925.5060806@redhat.com> Date: Wed, 13 Apr 2011 13:46:00 -0000 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: Rodrigo Rivas CC: Jonathan Wakely , gcc-patches List Subject: Re: [C++0x] Range-based for statements and ADL References: <4D8A2403.5050708@redhat.com> <4D90A209.2020508@redhat.com> <4D94B85F.1030603@redhat.com> <4D9F2D8B.1010507@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-04/txt/msg00986.txt.bz2 On 04/11/2011 04:50 PM, Rodrigo Rivas wrote: > Because the type of the expression must have complete type *only* if > it is an array. Actually, if it has class type, it must also have a complete type or the class member lookup is ill-formed. And you can't pass an expression of void type to a function call. So we can just unconditionally require a complete type. > Well, I just did that, but I'm not sure this is totally correct, I've > just begun to understand finish_call_expr. It works, if only because > I'm the only one using this new code path. Fell free to > revise/change/comment about it. It looks fine. > + ? LOOKUP_NONVIRTUAL : 0), Except this should be ? LOOKUP_NORMAL|LOOKUP_NORVIRTUAL : LOOKUP_NORMAL. The other calls to build_new_method_call here should be fixed that way, too. Jason