[patch, fortran] error.c: Cleanup, refactoring, column numbers in filename lines.

Brooks Moses brooks.moses@codesourcery.com
Mon Nov 6 08:14:00 GMT 2006


Brooks Moses wrote:
> ------------------------------------------------------------------
> error5.diff:
> 
> When a line contains only a single locus, and the locus is too far to 
> the right to fit onscreen without offsetting the offending source-code 
> line, GFortran does some rather strange calculations to figure out how 
> to offset the line.
> 
> Specifically, it places the locus on the first line 5 columns from the 
> left margin, and the locus on the second line 20 columns from the left 
> margin.  This is rather bizarre -- since the error is known to be near 
> the end of the line, it means that very little of the line is actually 
> shown.
> 
> This patch changes the offset calculation to one that makes much more 
> sense -- namely, setting the loci 5 and 20 columns, respectively, from 
> the _right_ margin.

I neglected to mention: This is changing the one-locus-per-line 
calculations to match the calculations that are done when a line 
contains two loci -- I'm not inventing anything new here.  :)

- Brooks



More information about the Fortran mailing list