[J3] IMPLICIT NONE

Bill Long longb at cray.com
Wed Jul 31 09:13:38 EDT 2019


In the Conformance list in 4.2, item (6) is

"it contains the capability to detect and report the use within a submitted program of name usage not consistent with the scope rules for names, labels, operators, and assignment symbols in Clause 19;”

I suspect that using a name as if it were the name of a variable, when it is not really the name of a variable because of the IMPLICIT NONE, runs afoul of something in Clause 19. 

But apart from the specific wording of the standard, a compiler that does not flag use of an undeclared variable name in a scope that has IMPLICIT NONE certainly fails the whole purpose of IMPLICIT NONE and hence should be fixed for QOI reasons. 


In looking at this issue, I see that in 8,7 IMPLICIT statement, the constraints 

C891 :  "	• If an IMPLICIT NONE statement appears in a scoping unit	…  No more than one IMPLICIT NONE statement shall appear in a scoping unit.”

and

C893 : "	• If an IMPLICIT NONE statement in a scoping unit …  	• there shall be no other IMPLICIT statements in the scoping unit."

appears to be at least partially redundant.  The wording of C891 seems to predate the EXTERNAL option for IMPLICIT NONE.  Perhaps something for DATA subgroup to consider. 


Chers,
Bill


 



> On Jul 31, 2019, at 5:46 AM, Robert Corbett via J3 <j3 at mailman.j3-fortran.org> wrote:
> 
> I cannot find where the standard
> requires an untyped variable
> name to be diagnosed in a scoping
> unit with IMPLICIT NONE.  Have I
> overlooked a constraint or
> processor requirement?
> 
> Bob Corbett

Bill Long                                                                       longb at cray.com
Principal Engineer, Fortran Technical Support &   voice:  651-605-9024
Bioinformatics Software Development                      fax:  651-605-9143
Cray Inc./ 2131 Lindau Lane/  Suite 1000/  Bloomington, MN  55425




More information about the J3 mailing list