This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch: make mapped locations the default


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]