[Patch, fortran] PR19262 more than thirty-nine continuation lines should issue a std-warn
Brooks Moses
bmoses@stanford.edu
Sat Sep 23 22:37:00 GMT 2006
Manfred Schwarb wrote:
> I just checked, ifort does not issue warnings with 300 continuation
> lines.
That's just because you didn't check a high enough number. Ifort 8.1
issues an error (not a warning) in fixed-form with 513 continuation
lines, and in free form with 7201 continuation lines.
> I'm really not good in interpreting the fortran standards, but I can
> imagine that the "shall not" is not meant to be a restriction to the
> compiler, but to the user who wants to write standards conforming code.
> I really can not imagine any reasons why a standard should not allow
> a compiler to accept more continuation lines as an extension.
That is correct. The standard, in general, refers to what programs are
allowed to include. When it specifically lists something as a
"Constrant:", that means that the compiler is required to emit an error
if a program is in violation. "Shall not" is not a constraint; the
compiler is not required to emit an error.
However, in many cases it is useful for the compiler to emit a warning
or error that is not strictly required by the standard, so "the compiler
isn't required to emit an error for excess continuation lines" is merely
a necessary argument, not a sufficient one, for making the case that the
compiler shouldn't emit at least a warning.
- Brooks
More information about the Fortran
mailing list