From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12219 invoked by alias); 7 Nov 2011 21:54:08 -0000 Received: (qmail 12208 invoked by uid 22791); 7 Nov 2011 21:54:07 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from rcsinet15.oracle.com (HELO rcsinet15.oracle.com) (148.87.113.117) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 07 Nov 2011 21:53:51 +0000 Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by rcsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id pA7LrnDD009987 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 7 Nov 2011 21:53:50 GMT Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id pA7Lrmbb003642 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 7 Nov 2011 21:53:49 GMT Received: from abhmt101.oracle.com (abhmt101.oracle.com [141.146.116.53]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id pA7Lrh9n001975; Mon, 7 Nov 2011 15:53:43 -0600 Received: from [192.168.1.4] (/79.56.218.51) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 07 Nov 2011 13:53:42 -0800 Message-ID: <4EB8535A.30104@oracle.com> Date: Mon, 07 Nov 2011 22:06:00 -0000 From: Paolo Carlini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: Jason Merrill CC: "gcc-patches@gcc.gnu.org" Subject: Re: [C++ Patch / RFC] PR 50864 References: <4EA867B7.7050406@oracle.com> <4EA86CD1.6090507@redhat.com> <4EA86DF0.7060709@oracle.com> <4EA86F27.4020907@oracle.com> <4EB8515D.5030803@redhat.com> In-Reply-To: <4EB8515D.5030803@redhat.com> Content-Type: multipart/mixed; boundary="------------040005000406060100080803" X-IsSubscribed: yes 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-11/txt/msg01076.txt.bz2 This is a multi-part message in MIME format. --------------040005000406060100080803 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 671 On 11/07/2011 10:45 PM, Jason Merrill wrote: > On 10/26/2011 04:35 PM, Paolo Carlini wrote: >> We have that parser->scope is a RECORD_TYPE and postfix_expression is an >> INDIRECT_REF. > Ah, OK. I guess we swallow up the namespace while parsing the full > nested-name-specifier and it isn't a problem. So I think handling > this here should be OK. But why check for ARROW_EXPR? Can't you > construct a similar testcase using .? Ah, very good. I'll investigate that. In the meanwhile I'm applying the below when testing finishes, which indeed, cannot hurt, the code ends-up being a bit cleaner. > I'll deal with 50870. Excellent. Paolo. /////////////////////// --------------040005000406060100080803 Content-Type: text/plain; name="CL_50864_code" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="CL_50864_code" Content-length: 149 2011-11-07 Paolo Carlini * pt.c (tsubst_copy_and_build): Fix qualified_name_lookup_error call in case COMPONENT_REF. --------------040005000406060100080803 Content-Type: text/plain; name="patch_50864_code" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="patch_50864_code" Content-length: 1195 Index: cp/pt.c =================================================================== --- cp/pt.c (revision 180619) +++ cp/pt.c (working copy) @@ -13741,14 +13741,12 @@ tsubst_copy_and_build (tree t, else if (TREE_CODE (member) == SCOPE_REF && TREE_CODE (TREE_OPERAND (member, 1)) == TEMPLATE_ID_EXPR) { - tree tmpl; - tree args; - /* Lookup the template functions now that we know what the scope is. */ - tmpl = TREE_OPERAND (TREE_OPERAND (member, 1), 0); - args = TREE_OPERAND (TREE_OPERAND (member, 1), 1); - member = lookup_qualified_name (TREE_OPERAND (member, 0), tmpl, + tree scope = TREE_OPERAND (member, 0); + tree tmpl = TREE_OPERAND (TREE_OPERAND (member, 1), 0); + tree args = TREE_OPERAND (TREE_OPERAND (member, 1), 1); + member = lookup_qualified_name (scope, tmpl, /*is_type_p=*/false, /*complain=*/false); if (BASELINK_P (member)) @@ -13762,7 +13760,7 @@ tsubst_copy_and_build (tree t, } else { - qualified_name_lookup_error (object_type, tmpl, member, + qualified_name_lookup_error (scope, tmpl, member, input_location); return error_mark_node; } --------------040005000406060100080803--