Emacs and GFortran
Brooks Moses
brooks.moses@codesourcery.com
Wed Nov 15 06:02:00 GMT 2006
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
More information about the Fortran
mailing list