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 to print column numbers in diagnostics


Geert Bosch wrote:
On Feb 12, 2005, at 16:26, Per Bothner wrote:

This patch prints the column number if non-zero, but only
if USE_MAPPED_LOCATION.  So for now it has limited usefulness,
and it may be reasonable to defer until after the branch.

It seems better to make this change after the branch, as it is somewhat likely that many column numbers will be imprecise or incorrect, since no one has looked at them yet.

Note that that column numbers are only printed if USE_MAPPED_LOCATION, which is only true if configured with --enable-mapped-location, which is not yet the default. (I'd like to make the default as soon as possible after the branch.)

Column numbers can be very useful if one
can rely on them being precise. If not, the usefulness
would be limited and the added information might even be
misleading.

Only Gcc developers (or others who configure with non-standard options, or who grab a snapshot *after* we change the default) will see them until 4.1 is released. For those people, we *want* them to report incorrect column numbers.

Also, I don't see why this needs to depend on USE_MAPPED_LOCATION.

Because column numbers aren't part of 'input_location' unless USE_MAPPED_LOCATION.

> Front ends that do not use this may still set column numbers.

Yes, but they cannot pass them to the back-end.  Neither trees
nor rtx nor input_location have a standard "field" for a column number,
except when USE_MAPPED_LOCATION is on.

It is reasonable to expect that when no column number is available,
the column field is set to zero. Where this is not the case currently,
that should be fixed.

Yes, that is the goal.


So I suggest adding the patch with that change after the branch.

By "that change" do you meaning making it unconditional on USE_MAPPED_LOCATION? That's not a option without a re-design. -- --Per Bothner per@bothner.com http://per.bothner.com/


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