From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 53559 invoked by alias); 8 Jan 2018 17:14:59 -0000 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 Received: (qmail 52042 invoked by uid 89); 8 Jan 2018 17:14:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=H*f:sk:b024eb1, H*i:sk:b024eb1 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 08 Jan 2018 17:14:57 +0000 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 54813C056827; Mon, 8 Jan 2018 17:14:56 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-116-37.ams2.redhat.com [10.36.116.37]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F0F1760467; Mon, 8 Jan 2018 17:14:55 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id w08HEqsk003872; Mon, 8 Jan 2018 18:14:53 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id w08HEp7l003871; Mon, 8 Jan 2018 18:14:51 +0100 Date: Mon, 08 Jan 2018 17:18:00 -0000 From: Jakub Jelinek To: Nathan Sidwell Cc: David Malcolm , Jason Merrill , Richard Biener , gcc-patches List Subject: Re: Location wrappers vs decls that change type (was Re: [v2 of PATCH 03/14] C++: add location_t wrapper nodes during parsing (minimal impl)) Message-ID: <20180108171451.GU1833@tucnak> Reply-To: Jakub Jelinek References: <1514567206-13093-1-git-send-email-dmalcolm@redhat.com> <1a3db854-830d-516c-61ed-ef503b47b946@redhat.com> <1515190808.24844.23.camel@redhat.com> <1515430963.24844.56.camel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) X-IsSubscribed: yes X-SW-Source: 2018-01/txt/msg00509.txt.bz2 On Mon, Jan 08, 2018 at 12:10:50PM -0500, Nathan Sidwell wrote: > > Both "_S_terminal" VAR_DECLs have a "_CharT" TEMPLATE_TYPE_PARM, but > > these types are different tree nodes. > > correct. they are not EQ but are EQUAL (same_type_p will be true). So perhaps location_wrapper_p could use that instead of pointer comparison. Though it would be expensive. > > Some ideas: > > > * don't add location wrappers if processing a template > > > > * introduce a new tree node for location wrappers (gah) > > > > * something I haven't thought of > > Add a flag on the VIEW_CONVERT/NON_LVALUE expr explicitly noting its > wrapperness (rather than infer it from TREE_TYPE == TREE_TYPE > (TREE_OPERAND)). TREE_LANG_FLAG_0 looks available? Yeah, I think most if not all lang flags are still available for those two tree codes and checking that should be quite cheap. Jakub