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: Emacs and GFortran


Nick Roberts wrote:
> FYI: I just committed a patch to the GCC 4.2 and 4.3 branches that > provides column numbers in the error messages. The format is as per the > following example:
> > ~/temp/>gfortran hello.F
> hello.F:3.6:
> > write(*,) 'Hello!' > > 1
> Error: Syntax error in WRITE statement at (1)


Thanks, but the error seems to be in column 11 i.e in Emacs the first column
is 0 and the first six (blank) columns are counted too.

Oh, oops -- that's my fault; I edited the error message quoted in an old post, rather than actually running it to generate a real message, and missed the blank columns when I was hand-counting. The blanks would very definitely be counted in a real error message. Thanks for catching that!


There is still an off-by-one error; we number the first column as 1 rather than 0. Given that there's a very strong tradition in Fortran of numbering columns starting with 1, and that off-by-one errors in column location are within the noise level of locating things (given that nearly all errors are several columns wide), I think it makes more sense overall to keep it the way it currently is.

- Brooks


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