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: [RFC, stage1] Richer source location information for gcc 6 (location ranges etc)


On 16 March 2015 at 17:52, David Malcolm <dmalcolm@redhat.com> wrote:
> I've been experimenting with revamping our diagnostics to better show
> source locations.  Some of the ideas are inspired by Clang's
> diagnostics, but I'm going beyond what it does in some areas.
>
> I'm attaching a patch (against r221423), which is very much a
> work-in-progress, but in a "release early, release often" spirit I
> thought I'd solicit feedback here (obviously this would be for our next
> stage 1/gcc 6):

Wow, awesome!

Obviously, I'm very much in favour of this in general.

>From my own experience, you are going to have two enormous
bike-shedding "experiences": one for the API and another for the
output. My advice would be to implement a few obvious testcases and
just the ability to print some more detailed location info, like
Clang's -fdiagnostics-print-source-range-info (but see also my past
troubles with that:
https://gcc.gnu.org/ml/gcc-patches/2009-08/msg00174.html) without even
printing any caret info. This way you can work out the internal
details without having to defend at the same time the actual user
interface. I think my mistake was to try to implement
-fdiagnostics-print-source-range-info as a user option, I should have
proposed it as a debug option such as -fdump-location-info and just
move forward from that.

Also, people are going to more easily review and accept this if you
propose small incremental steps that just tackle (initially) one case
at a time (of course, you may be working on your grand plan behind the
scenes).

Cheers,

Manuel.


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