public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Joseph S. Myers" <joseph@codesourcery.com>
To: Nathan Froyd <froydnj@codesourcery.com>
Cc: Jason Merrill <jason@redhat.com>,
	gcc-patches@gcc.gnu.org,     rguenther@suse.de
Subject: Re: [PATCH PING] c++-specific bits of tree-slimming patches
Date: Thu, 21 Apr 2011 16:33:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.64.1104211553180.15031@digraph.polyomino.org.uk> (raw)
In-Reply-To: <20110414113045.GD23480@codesourcery.com>

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).

Seems fine with me.

-- 
Joseph S. Myers
joseph@codesourcery.com

  parent reply	other threads:[~2011-04-21 15:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-24 13:15 Nathan Froyd
2011-04-05 12:10 ` Nathan Froyd
2011-04-08 17:50 ` Jason Merrill
2011-04-14 11:30   ` Nathan Froyd
2011-04-14 11:32     ` Richard Guenther
2011-04-21 16:33     ` Joseph S. Myers [this message]
2011-04-22  2:49   ` Nathan Froyd
2011-04-22  3:59     ` Jason Merrill
2011-04-22  4:22       ` Nathan Froyd
2011-04-22  8:57         ` Jason Merrill
2011-04-22  9:12           ` Mike Stump
2011-04-22 12:36             ` Richard Guenther
2011-04-22 14:45               ` Nathan Froyd
2011-04-22 16:59             ` Jason Merrill
2011-04-22 17:35               ` Mike Stump
2011-04-29  8:38               ` Alexandre Oliva
2011-04-25 23:06           ` Nathan Froyd

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.1104211553180.15031@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=froydnj@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jason@redhat.com \
    --cc=rguenther@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).