"Text exceeds right hand column allowed on line" warning with 132 characters

"Text exceeds right hand column allowed on line" warning with 132 characters

I have been getting these warnings for quite some time and quite a successive number of compiler versions now:

$ ifort -std08 -c example_ifort.f90
  example_ifort.f90(3): warning #5268: Extension to standard: The text exceeds right hand column allowed on the line.
  sdescl = 'hsedasak..=rhfaeu4ebsrrdlvek.arlhamts#tltnoari.aiktlwtil4eelkvararf.4.sthatnrioiaaahh1e,..nevtinned.ada.sneedmomreeotxt'
  ----------------------------------------------------------------------------------------------------------------------------------^

The compiler warns that the line exceeds the maximum length of 132 characters, even though the line is exactly 132 characters long. The complete example_ifort.f90 source is:

program example
  character :: str*(132)
  str = 'hsedasak..=rhfaeu4ebsrrdlvek.arlhamts#tltnoari.aiktlwtil4eelkvararf.4.sthatnrioiaaahh1e,..nevtinwned.agda.snededmomreeotxt'
end program example

This happens every now and then for lines that have exactly 132 characters, but definitely not for all such lines. The warning goes away when removing the -std08 flag. I'm using the Fortran compiler v15.0.2.164 for Linux. Is this a bug in the compiler, or am I missing something?

9 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

The bug also occurs with the 15.0.4 compiler on Windows.

Thanks - we'll take a look. It is a standards warning, which is why removing -std08 makes it go away.

Retired 12/31/2016

Escalated as issue DPD200371584.

Retired 12/31/2016

>>This happens every now and then for lines that have exactly 132 characters

Maybe it is counting the line termination character of either the affected line or the line just before.

It may be an issue of CRLF vs LFCR vs CR vs LF (or trailing TAB) which is hard to tell with most editors.

When I get something like that, I open the source file in a Hex editor to see what is actually there.

Jim Dempsey

Jim, that was a thought that occurred to me when I responded a couple of days ago.

I tried two versions of the source file, one with CR+LF for EOL, another with only LF for EOL. Neither had any tab characters (as revealed by the Cygwin hexdump utility). Note that the error does not occur if the /stand:f08 option is not used.

I can reproduce this on Windows easily enough, and another line of the same length doesn't trigger it.

As I mentioned above, this is a standards warning (not an error), so you have to enable standards checking to see the diagnostic.

Retired 12/31/2016

Fixed for a future major release.

Retired 12/31/2016

Cool, cheers! :-)

Leave a Comment

Please sign in to add a comment. Not a member? Join today