From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24816 invoked by alias); 26 Sep 2011 13:58:58 -0000 Received: (qmail 24791 invoked by uid 22791); 26 Sep 2011 13:58:56 -0000 X-SWARE-Spam-Status: No, hits=-6.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS 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; Mon, 26 Sep 2011 13:58:29 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p8QDwS9C001079 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 26 Sep 2011 09:58:29 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p8QDwSNW032757; Mon, 26 Sep 2011 09:58:28 -0400 Received: from [0.0.0.0] ([10.3.113.13]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p8QDwRhA010027; Mon, 26 Sep 2011 09:58:27 -0400 Message-ID: <4E808502.4000406@redhat.com> Date: Mon, 26 Sep 2011 14:28:00 -0000 From: Jason Merrill User-Agent: Mozilla/5.0 (X11; Linux i686; rv:6.0.2) Gecko/20110906 Thunderbird/6.0.2 MIME-Version: 1.0 To: =?ISO-8859-1?Q?Fabien_Ch=EAne?= CC: Paolo Carlini , "gcc-patches@gcc.gnu.org" Subject: Re: [Patch] PR c++/26256 References: <4D1279FD.6010706@redhat.com> <4D7297F5.2000708@redhat.com> <4E020BE2.7080207@redhat.com> <4E77D811.5000701@redhat.com> <4E7A28A0.8020805@redhat.com> <4E7B5816.6010802@redhat.com> <4E7BB7A5.8020305@redhat.com> <46E788AC-54C0-45AE-A435-BD2F0950C0C2@oracle.com> <4815CE83-E59D-47D2-BE6B-33A01DED37B8@oracle.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit 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-09/txt/msg01601.txt.bz2 On 09/25/2011 05:06 PM, Fabien ChĂȘne wrote: > + else if ((using_decl = strip_using_decl (member)) != member) > + /* If it is a using decl, use its underlying decl. */ > + type_decl = strip_using_decl (type_decl); > - if (DECL_NAME (field) == name > + if (DECL_NAME (decl) == name > && (!want_type > - || TREE_CODE (field) == TYPE_DECL > - || DECL_CLASS_TEMPLATE_P (field))) > - return field; > + || TREE_CODE (decl) == TYPE_DECL > + || DECL_CLASS_TEMPLATE_P (decl))) > + return decl; Why do we need to strip the USING_DECL both in lookup_field_1 and in callers? > + /* do not push the decl more than once */ Comments should start with a capital letter and end with a period. This should also say "unless we need to compare underlying types at instantiation time" > + /* We allow pushing an enum multiple times in a class > + * template in order to handle late matching of underlying > + * type on an opaque-enum-declaration followed by an > + * enum-specifier. */ And we don't put * at the beginning of each line. > + enumtype = xref_tag (enum_type, name, /*tag_scope=*/ts_current, false); > + /* TARGET_BVAL is error_mark_node when TARGET_DECL's name has been used > + else if (TREE_CODE (target_bval) == TYPE_DECL && DECL_ARTIFICIAL (target_bval) > + || same_type_p (TREE_TYPE (target_decl), TREE_TYPE (target_bval)))) > + else if (TREE_CODE (target_decl) == VAR_DECL && TREE_CODE (target_bval) == VAR_DECL > + if (TREE_CODE (target_decl) == TYPE_DECL && DECL_ARTIFICIAL (target_decl)) > + else if (TREE_CODE (target_decl) == OVERLOAD && is_overloaded_fn (target_bval)) > + else if (TREE_CODE (decl) == USING_DECL && is_overloaded_fn (target_bval)) > + else if (TREE_CODE (bval) == USING_DECL && is_overloaded_fn (target_decl)) These lines go past 80 characters. Jason