[Patch, Fortran] PR fortran/37688: Relax "used before typed" check

Daniel Kraft d@domob.eu
Sun Oct 12 09:48:00 GMT 2008


Paul,

> Which other compilers accept this feature and why is it so
> unreasonable to place declarations in standard conforming order?
> 
> I am completely against bending the standard on the grounds that
> something is "used in real world code".   As very least, do a standard
> check on it and preferably don't do it at all.

I agree here, but I also believe the patch in question is a "reasonable" 
extension to the "used before typed" permission already there; on the 
other hand, however, I think we could get rid of it entirely, but I'm 
not a user of any legacy code and at the time we worked that one out, I 
got the impression that at least

INTEGER :: arr(n), n

is something used over and over that should be accepted by all means 
(but maybe my impression was wrong).  Given this invalid code is already 
accepted, I think it is better to extend this permission like done here 
to accept even more legacy code (if possible without other problems) (or 
disable the permission entirely).

I'm not sure what you mean by the standard check, but with -std=f95 and 
friends this code is of course rejected, both now and with the patch.

Thanks for your comments though, as a non-legacy-code user I base my 
opinion there just on input I get from all the others ;)

Daniel

-- 
Done:  Arc-Bar-Cav-Rog-Sam-Val-Wiz
To go: Hea-Kni-Mon-Pri-Ran-Tou



More information about the Fortran mailing list