------- Comment #5 from burnus at gcc dot gnu dot org 2009-07-25 17:09 ------- (In reply to comment #4) > I am inclined to leave this as is because it is a common practice to use > positions 73 thru 80 for indexing in legacy fixed form code. (Remember those > punch cards!)
Yes - and that's the reason why there is no warning by default. But it happens very easily that one adds a space somewhere and all of a sudden the result changes. How many lines does the following program print? For that reason, gfortran offers an option to diagnose this. If one uses those columns for comments, one does not need to enable the warning (off by default for fixed-form code). ! Expected: No warning by default (as column 73+ is often used for ! comments in fixed-form source code. ! However, with -Wline-truncation there shall be a warning. implicit none call foo([11, 22, 33, 44, 55, 66, 770, 9900, 1100, 1100, 120], 12 & , 'Hello') contains subroutine foo(a,n,s) integer :: a(*), n, i character(len=*) :: s do i = 1, n print *, s, a(i) end do end subroutine foo end ! Answer: One line, the "12" gets truncated to "1". Such problems can easily happens if one corrects e.g. a "99" to "100" - and the previous editor used all space and put the comma in the next line. -- burnus at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|WONTFIX | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39229