Gfortran from SVN: "Error: Syntax error in argument list at (1)"

Brooks Moses brooks.moses@codesourcery.com
Fri May 4 08:39:00 GMT 2007


Tobias Burnus wrote:
> However, gfortran should
> 
> - either give a better error message, such as NAG f95:
> Error: snippet.f90, line 23: Line too long - truncated
> 
> - or accept by default longer lines as Intel's ifort does
> 
> - or print at least a warning as g95 does:
> Warning (115): Line 23 of snippet.f90 is being truncated
> 
> (By the way, the current behaviour of gfortran matches sunf95.)
> 
> I'm in favour of either (silently or not) accepting longer lines (with
> -std=gnu) or giving an error. I don't think any program relies on
> truncated lines in free format. (In fixed format some do.)

Agreed.  I think that giving an error is preferable to silently 
accepting the code, since there are probably compilers other than 
GFortran out there that cut the lines short and then give cryptic error 
messages.  And thus we're not really doing programmers any favors by not 
letting them know about the problem.

Probably the best option would be to read in the whole line without 
truncating it, but (by default) give a warning about the line being 
overlength.

(I'd be glad to put that on my to-do list and get to it in a month or 
so, unless someone else wants to work on it.)

- Brooks



More information about the Fortran mailing list