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: erroneous warning about line truncation


Steve Kargl wrote:
On Mon, Nov 02, 2009 at 09:03:10AM -0800, Hans Horn wrote:
Folks,

I get warnings about line truncation on fixed-form (f77) code when I have inline comments starting at column 73 and beyond.


Fixed-form code is restricted to 72 columns. From the Fortran 2003 Standard.

3.3.2 Fixed source form

In fixed source form, there are restrictions on where a statement mayr
appear within a line.  If a source line contains only default kind
characters, it shall contain exactly 72 characters; otherwise, its
maximum number of characters is processor dependent.

See the gfortran manual for options that allows you to violate this
restricton.


Steve,


line 5 in the mock code I posted emits a warning, while line 4 doesn't.
Both lines are more than 72 chars in length.

subroutine foo
IMPLICIT NONE
Integer stupid_dummy_variable1 ! stupid_dummy_variable1
Integer stupid_dummy_variable2 ! stupid_dummy_variable2
Integer stupid_dummy_variable3 ! stupid_dummy_variable3


      write(*,*) stupid_dummy_variable1,
     &           stupid_dummy_variable2,
     &           stupid_dummy_variable3

end

If that part of the standard applies to inline comments as well, then I'd expect that both lines should emit a warning .

H.


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