public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Gcc Patch List <gcc-patches@gcc.gnu.org>
Subject: Re: Patch: make mapped locations the default
Date: Fri, 26 Oct 2007 09:18:00 -0000	[thread overview]
Message-ID: <m3ejfibc87.fsf@fleche.redhat.com> (raw)
In-Reply-To: <m3myu6bi2u.fsf@fleche.redhat.com> (Tom Tromey's message of "Thu\, 25 Oct 2007 22\:44\:41 -0600")

>>>>> "Tom" == Tom Tromey <tromey@redhat.com> writes:

Tom> This patch changes gcc/configure.ac to make mapped locations the
Tom> default.

After playing with this a bit, I think we should disable column number
output.  It is very easy to find places where the C and C++ front
ends, at least, emit bogus column information.

Also, fixing this is not entirely simple.  Well, for decls it is
reasonably simple... I have a patch for the C FE that I'll send soon;
it fixes most cases.

However, for expressions it does not look very easy.  I think it would
be risky (not to mention ugly) to change build* to set the default
location of expressions from input_location.  Even if we did this we'd
have to make sure input_location is set properly -- which it generally
is not.

Likewise, changing the API of build* or fold_build* is fairly involved
(if not this would be my preferred approach, as I think it is the best
API design -- in my view the location ought to be set in the
constructor and then never changed).

Moving out another layer, I suppose we could fix build_unary_op and
friends.  That is still a reasonably large number of call sites.  It
doesn't seem easy to apply the fix in the callers of these functions,
due to default_conversion.

Any comments?  Disagreements with my analysis?  Not that I usually
have to ask about disagreements ;)

Note that with mapped locations there is no space penalty to assigning
a location to every expression.

Tom

      parent reply	other threads:[~2007-10-26  7:16 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-26  7:16 Tom Tromey
2007-10-26  8:06 ` Eric Botcazou
2007-10-26  8:16   ` Tom Tromey
2007-10-31 15:55   ` Tom Tromey
2007-10-31 21:14     ` Eric Botcazou
2007-11-04 23:34       ` Mark Mitchell
2007-11-05  1:11         ` Tom Tromey
2007-11-05  1:38           ` Mark Mitchell
2007-11-05 14:58             ` Tom Tromey
2007-11-08 13:58               ` Tom Tromey
2007-11-08 14:28                 ` Manuel López-Ibáñez
2007-11-08 14:47                   ` Tom Tromey
2007-11-08 14:36                 ` Andreas Schwab
2007-11-08 14:45                   ` Tom Tromey
2007-11-08 15:54                     ` Mark Mitchell
2007-11-12 22:01                       ` Dirk Mueller
2007-10-26  9:18 ` Tom Tromey [this message]

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=m3ejfibc87.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    /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).