This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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, Fortran] Show better error location


On 01.06.2013 14:51, Tobias Burnus wrote:
> I am still not happy with changing the length of the displayed
> source-code in error messages to infinity if not terminal is available.
> One reason is that for long lines (e.g. generated code or long trailing
> comment lines) - the output is not very readable. And that the terminal
> is not available happens quite often, e.g. if one uses pipes to "less"
> or "tee" - or redirects to a file.
For the redirection to "less", one can use "less -S".
For "tee", it depends on what comes behind.
For the file case, one doesn't know how wide the final display will be.
It is easy to trim afterwards, but the converse is not true (obviously),
so my point is: keep everything if we don't know how much should be removed.

Would you be more pleased if the checks were reversed, that is first get
the terminal width, then if it fails check if we are outputting to a tty
and if not don't limit the output?


>   * * *
>
> I think that one reason for the wish to extend the displayed lines lies
> elsewhere: gfortran sometimes does a bad job with the column location in
> error messages. That's especially visible in the test suite which uses
> long dg-error/dg-warning comments after the actual code.
>
> Thus, I think we should fix the bad column location. (That's beneficial,
> independent whether one increased the trim length or not.) 
Certainly

>
> Build and regtested on x86-64-gnu-linux.
> OK for the trunk?
>
OK, thanks.

Mikael


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