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: [Patch, fortran] PR19262 more than thirty-nine continuation lines should issue a std-warn


Jerry,

> Going into this patch I took the view that gfortran is primarily a 
> Fortran 95 compiler with F2003 features. So I thought the default 
> behavior should be the least restrictive of the two with 255 for free 
> form.

If you do this, you build up a regression vs. g77.
g77 does not enforce any restrictions concerning the number of 
continuation lines, you can do even more than 255 continuations, even
without any warnings.

So the default behaviour (-std=gnu) should be to enforce no limits.
For me, the scheme FX proposed is the only one that makes sense,
modulo the differentation between fixed and free.

Concerning warnings: I do not have various compilers at hand at the
moment, but as I vaguely remember it used to be a very common 
compiler extension to allow unlimited continuation lines, so I think
there is plenty of legacy code violating these limits.
You want all these legacy codes spit warnings? 
I think a warning is not very helpful, as it may be cumbersome 
to rewrite your code, and allowing more lines does really no harm.
And if you want to write portable code, you are expected to use
"-std=f95" or similar anyway, I think?
I just checked, ifort does not issue warnings with 300 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.

In the past, Richard wrote an email about what's meant to be a
requirement to the user and what's a requirement to the compiler, but
I can't find it at the moment, and I really don't know if it's 
appropriate in this context.

regards,
Manfred


-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer


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