Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
1 View

Bug regarding warnings about line truncation

I am working on a fixed format Fortran legacy program and found a bug regarding the warnings about line truncation.

If you compile the following program using:

ifort  -warn all,error source_truncation.f

      program source_truncation                                                 
      integer :: i                                                              
                                                                                
* This comment exceed column 72 and does not lead to an error.  pewpepepwwepwepwe
      ! This comment exceeds column 72 and does lead to an error.  pewpepepwwepwe
      i = 1 + 2                                                                 
      write(*, *) i                                                             
      end program           

you will get an error only for the second comment.

It is a bit inconsistent, that a comment, as defined by a character in the first column, and a comment, as defined by exclamation marks, are treated differently.

 

The tested compilers are:

ifort (IFORT) 18.0.1 20171018

ifort (IFORT) 16.0.1 20151021

0 Kudos