Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29276 Discussions

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

Astro_F_
Beginner
2,366 Views

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?

0 Kudos
8 Replies
mecej4
Honored Contributor III
2,366 Views

The bug also occurs with the 15.0.4 compiler on Windows.

0 Kudos
Steven_L_Intel1
Employee
2,366 Views

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

0 Kudos
Steven_L_Intel1
Employee
2,366 Views

Escalated as issue DPD200371584.

0 Kudos
jimdempseyatthecove
Honored Contributor III
2,366 Views

>>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

0 Kudos
mecej4
Honored Contributor III
2,366 Views

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.

0 Kudos
Steven_L_Intel1
Employee
2,366 Views

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.

0 Kudos
Steven_L_Intel1
Employee
2,366 Views

Fixed for a future major release.

0 Kudos
Astro_F_
Beginner
2,366 Views
Cool, cheers! :-)
0 Kudos
Reply