This is the mail archive of the gcc-patches@gcc.gnu.org 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: [fortran, patch] Remove parentheses and comma in error message.


This change was suggested by Steve; I also prefer it to the current version.

Old/current error message (example):
---------------
Fortran runtime error: Array reference out of bounds for array 'a',
upper bound of dimension 1 exceeded (in file 'string2.f90' at line 6)
---------------

New/proposed error message (example):
---------------
Fortran runtime error: Array reference out of bounds for array 'a',
upper bound of dimension 1 exceeded in file 'string2.f90' at line 6
---------------

Well, I do happen to find the current version better (perhaps easier to parse automatically), but that's not a big deal. However, I feel we should have more opinions on that change since it has a high impact. Especially, maybe we should have a uniform format for runtime error messages, e.g. I/O errors are currently using a very different error message style:


$ cat a.f90
  integer :: i = - 1
  open(i,status="scratch")
  end
$ gfortran a.f90 && ./a.out
At line 2 of file a.f90
Fortran runtime error: Bad unit number in OPEN statement

FX


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