From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 42955 invoked by alias); 23 Nov 2015 16:58:02 -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 42920 invoked by uid 89); 23 Nov 2015 16:58:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 23 Nov 2015 16:58:01 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 340DDC0F1D01; Mon, 23 Nov 2015 16:58:00 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-116-34.ams2.redhat.com [10.36.116.34]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tANGvwp9006463 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 23 Nov 2015 11:57:59 -0500 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id tANGvuh6031662; Mon, 23 Nov 2015 17:57:56 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id tANGvtZf031661; Mon, 23 Nov 2015 17:57:55 +0100 Date: Mon, 23 Nov 2015 17:08:00 -0000 From: Jakub Jelinek To: David Malcolm Cc: Richard Biener , Jason Merrill , GCC Patches Subject: Re: [PATCH/RFC] C++ FE: expression ranges (v2) Message-ID: <20151123165754.GF5675@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <1446868737-3306-1-git-send-email-dmalcolm@redhat.com> <1447563717-24429-1-git-send-email-dmalcolm@redhat.com> <564E3512.9080701@redhat.com> <56501A61.6010806@redhat.com> <20151121082151.GQ5675@tucnak.redhat.com> <1448297620.19594.168.camel@surprise> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1448297620.19594.168.camel@surprise> User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg02764.txt.bz2 On Mon, Nov 23, 2015 at 11:53:40AM -0500, David Malcolm wrote: > Does the following look like the kind of thing you had in mind? (just > the tree.def part for now). Presumably usable for both lvalues and > rvalues, where the thing it wraps is what's important. It merely exists > to add an EXPR_LOCATION, for a usage of the wrapped thing. Yes, but please see with Jason, Richard and perhaps others if they are ok with that too before spending too much time in that direction. All occurrences of it would have to be folded away during the gimplification at latest, this shouldn't be something we use in the middle-end. > diff --git a/gcc/tree.def b/gcc/tree.def > index 44e5a5e..30fd766 100644 > --- a/gcc/tree.def > +++ b/gcc/tree.def > @@ -1407,6 +1407,13 @@ DEFTREECODE (CILK_SPAWN_STMT, "cilk_spawn_stmt", tcc_statement, 1) > /* Cilk Sync statement: Does not have any operands. */ > DEFTREECODE (CILK_SYNC_STMT, "cilk_sync_stmt", tcc_statement, 0) > > +/* Wrapper to add a source code location to an expression, either one > + that doesn't have one (such as an INTEGER_CST), or to a usage of a > + variable (e.g. PARAM_DECL or VAR_DECL), where we want to record > + the site in the source where the variable was *used* rather than > + where it was declared. */ > +DEFTREECODE (LOCATION_EXPR, "location_expr", tcc_unary, 1) > + > /* > Local variables: > mode:c Jakub