From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22492 invoked by alias); 11 Mar 2011 15:04:01 -0000 Received: (qmail 22481 invoked by uid 22791); 11 Mar 2011 15:04:01 -0000 X-SWARE-Spam-Status: No, hits=-6.2 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; Fri, 11 Mar 2011 15:03:52 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p2BF3iFu004050 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 11 Mar 2011 10:03:44 -0500 Received: from [127.0.0.1] (ovpn-113-58.phx2.redhat.com [10.3.113.58]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p2BF3hS7018254; Fri, 11 Mar 2011 10:03:43 -0500 Message-ID: <4D7A39CF.1010909@redhat.com> Date: Fri, 11 Mar 2011 15:04:00 -0000 From: Jason Merrill User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b2 Thunderbird/3.1.7 MIME-Version: 1.0 To: Nathan Froyd CC: gcc-patches@gcc.gnu.org Subject: Re: [PATCH 15/18] move REAL_IDENTIFIER_TYPE_VALUE to be a field of lang_identifier References: <1299817406-16745-1-git-send-email-froydnj@codesourcery.com> <1299817406-16745-16-git-send-email-froydnj@codesourcery.com> <4D7A2648.40005@redhat.com> <20110311140444.GI23686@codesourcery.com> <20110311141956.GJ23686@codesourcery.com> In-Reply-To: <20110311141956.GJ23686@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1; 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-03/txt/msg00623.txt.bz2 On 03/11/2011 09:19 AM, Nathan Froyd wrote: > On Fri, Mar 11, 2011 at 06:04:45AM -0800, Nathan Froyd wrote: >> On Fri, Mar 11, 2011 at 08:40:24AM -0500, Jason Merrill wrote: >>> On 03/10/2011 11:23 PM, Nathan Froyd wrote: >>> The C++ FE expects that we can check the TREE_TYPE of anything that >>> appears as an expression, and uses IDENTIFIER_NODE to indicate a >>> dependent name within templates. If you want to break TREE_TYPE on >>> IDENTIFIER_NODE, you need to change the representation of dependent >>> names so that we can continue to use TREE_TYPE on all expressions. >> >> I'm confused. Isn't this what the switching on IDENTIFIER_NODE in a >> number of places is doing? (And any future places that g++/libstdc++ >> didn't catch will be an ICE.) Or are you saying that you don't want the >> switching and IDENTIFIER_NODEs should retain TREE_TYPE unless and until >> somebody comes forth with a better design? The latter. > Or, alternatively, are you saying that blindly replacing TREE_TYPE with > REAL_IDENTIFIER_TYPE_VALUE is wrong, semantically speaking, as TREE_TYPE > and REAL_IDENTIFIER_TYPE_VALUE mean different things and should be kept > separate, even if they happen to share the same storage? This too. I'm surprised that them sharing the same storage hasn't broken anything yet. > And if so, > would moving that storage into lang_identifier be OK Moving the uses of REAL_IDENTIFIER_TYPE_VALUE into lang_identifier or even a separate hash table would be OK. > so long as the > requisite occurrences of TREE_TYPE are audited and the appropriate name > (REAL_IDENTIFIER_TYPE_VALUE vs. ...I don't know, EXPR_LIKE_TYPE) is > used? No, I want to keep using TREE_TYPE. I was thinking of something more like the DEPENDENT_NAME_EXPR that Joseph mentioned. Jason