This is the mail archive of the gcc@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] GCC caret diagnostics


Tom Tromey <tromey@redhat.com> writes:

> Ian suggested that we delete this information after the FE is
> finished.  This makes sense, I think, from a memory-saving
> perspective.  But, that means we will get different kinds of error
> output depending on when a diagnostic is emitted, which I think is
> pretty unfriendly -- it exposes implementation details of gcc to the
> user.

I think that is mostly OK in practice because most diagnostics are
issued by the front end.  But I admit that some come from the
middle-end, so there would be an inconsistency.

Another approach would be to only use the carets for parse errors,
which is where they are the most helpful.  For a middle-end error like
"assuming signed overflow does not occur when simplifying
multiplication" a caret pointer might be more misleading than
otherwise, as one thing we know for sure is that it would not point at
a multiplication operator.

What do other compilers do?  Reopening the file doesn't work for
standard input, which I admit is an unusual case.

Ian


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