From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4079 invoked by alias); 14 Apr 2011 11:32:17 -0000 Received: (qmail 4070 invoked by uid 22791); 14 Apr 2011 11:32:17 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_50,TW_JS,TW_TM,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 14 Apr 2011 11:32:13 +0000 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.221.2]) by mx2.suse.de (Postfix) with ESMTP id E7462867E2; Thu, 14 Apr 2011 13:32:11 +0200 (CEST) Date: Thu, 14 Apr 2011 11:32:00 -0000 From: Richard Guenther To: Nathan Froyd Cc: Jason Merrill , gcc-patches@gcc.gnu.org, joseph@codesourcery.com Subject: Re: [PATCH PING] c++-specific bits of tree-slimming patches In-Reply-To: <20110414113045.GD23480@codesourcery.com> Message-ID: References: <20110324131518.GO23480@codesourcery.com> <4D9F4AE0.6050200@redhat.com> <20110414113045.GD23480@codesourcery.com> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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-04/txt/msg01055.txt.bz2 On Thu, 14 Apr 2011, Nathan Froyd wrote: > On Fri, Apr 08, 2011 at 01:50:24PM -0400, Jason Merrill wrote: > > On 03/24/2011 09:15 AM, Nathan Froyd wrote: > >> + tree t = make_node (CASE_LABEL_EXPR); > >> + > >> + TREE_TYPE (t) = void_type_node; > >> + SET_EXPR_LOCATION (t, input_location); > > > > As jsm and richi said, using input_location like this is a regression. > > Can we use DECL_SOURCE_LOCATION (label_decl) instead? > > Sure. Joseph, Richi, are you happy with that change? It would fix the > C/C++ regression, as c_add_case_label does: > > /* Create the LABEL_DECL itself. */ > label = create_artificial_label (loc); > ... > /* Add a CASE_LABEL to the statement-tree. */ > case_label = add_stmt (build_case_label (loc, low_value, high_value, label)); > > so the DECL_SOURCE_LOCATION would be the same as the location_t we were > passing in anyway. For the other languages, I think it would be neutral > or an improvement (they all use input_location or UNKNOWN_LOCATION for > the CASE_LABEL anyway). Yes, using DECL_SOURCE_LOCATION (label_decl) sounds like the correct thing. Richard.