From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22430 invoked by alias); 15 Nov 2017 06:17:37 -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 22406 invoked by uid 89); 15 Nov 2017 06:17:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,KB_WAM_FROM_NAME_SINGLEWORD,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.2 spammy=Hx-languages-length:1286 X-HELO: paperclip.tbsaunde.org Received: from tbsaunde.org (HELO paperclip.tbsaunde.org) (66.228.47.254) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 15 Nov 2017 06:17:35 +0000 Received: from ball (pool-98-116-146-128.nycmny.fios.verizon.net [98.116.146.128]) by paperclip.tbsaunde.org (Postfix) with ESMTPSA id A13F6C088; Wed, 15 Nov 2017 06:17:33 +0000 (UTC) Date: Wed, 15 Nov 2017 06:31:00 -0000 From: Trevor Saunders To: David Malcolm Cc: Jason Merrill , Nathan Sidwell , Jakub Jelinek , Richard Biener , gcc-patches List Subject: Re: [PATCH 02/14] Support for adding and stripping location_t wrapper nodes Message-ID: <20171115061704.q4jypxdhfiofk5o5@ball> References: <1510350329-48956-1-git-send-email-dmalcolm@redhat.com> <1510350329-48956-3-git-send-email-dmalcolm@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1510350329-48956-3-git-send-email-dmalcolm@redhat.com> User-Agent: NeoMutt/20170609 (1.8.3) X-SW-Source: 2017-11/txt/msg01150.txt.bz2 On Fri, Nov 10, 2017 at 04:45:17PM -0500, David Malcolm wrote: > This patch provides a mechanism in tree.c for adding a wrapper node > for expressing a location_t, for those nodes for which > !CAN_HAVE_LOCATION_P, along with a new method of cp_expr. > > It's called in later patches in the kit via that new method. > > In this version of the patch, I use NON_LVALUE_EXPR for wrapping > constants, and VIEW_CONVERT_EXPR for other nodes. > > I also turned off wrapper nodes for EXCEPTIONAL_CLASS_P, for the sake > of keeping the patch kit more minimal. > > The patch also adds a STRIP_ANY_LOCATION_WRAPPER macro for stripping > such nodes, used later on in the patch kit. I happened to start reading this series near the end and was rather confused by this macro since it changes variables in a rather unhygienic way. Did you consider just defining a inline function to return the actual decl? It seems like its not used that often so the slight extra syntax should be that big a deal compared to the explicitness. Other than that the series seems reasonable, and I look forward to having wrappers in more places. I seem to remember something I wanted to warn about they would make much easier. Thanks Trev