This is the mail archive of the 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: [patch, fortran] error.c: Cleanup, refactoring, column numbers in filename lines.

Brooks Moses wrote:

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

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