This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] GCC caret diagnostics
On Wed, Mar 12, 2008 at 7:00 PM, Manuel López-Ibáñez
<lopezibanez@gmail.com> wrote:
> On 07/03/2008, Tom Tromey <tromey@redhat.com> wrote:
> > >>>>> "Manuel" == Manuel López-Ibáñez <lopezibanez@gmail.com> writes:
>
> > Manuel> The third approach would be to store an offset and when
> > Manuel> generating diagnostics, reopen the file, fseek to the offset
> > Manuel> and print that line.
> >
> > I tend to favor this, provided that the performance is not too awful.
> > But maybe this is painful due to iconv translation?
>
> How should a file be properly opened within GCC? I find the code in
> libcpp/files.c pretty confusing and also I am not interested in
> parsing the file, so some of the conversions it makes are probably
> superflous (or perhaps even impossible when calling from
> expand_location).
>
>
> > How about -fshow-caret instead of -fdiagnostics-show-caret?
> > (By analogy with -fshow-column.)
>
> Well, we have -fdiagnostics-show-option and
> -fdiagnostics-show-location. So 2 versus 1. ;-) That said, I would
> also prefer -fshow-option and -fshow-location.
This was done long time ago to reserve a `diagnostic' namespace in
the maze of -f options. I would suggest we continue that for consistency.