J3/15-103r1 To: J3 From: Van Snyder Subject: Interpretation concerning name usage Date: 2014 December 03 If /INTERP decides this is too picayune to be processed as an interpretation and published in a corrigendum, it can be (a) proposed as a wart-removal work item, (b) corrected as an "editorial" matter, or (c) ignored. ---------------------------------------------------------------------- NUMBER: TBD TITLE: Is a processor required to report only improper name usage? KEYWORDS: names, labels, operators, assignment symbols, scoping DEFECT TYPE: Interpretation STATUS: J3 consideration in progress QUESTION: Is a conforming processor required to report improper usage of label 10? go to 10 block 10 continue end block Is a conforming processor required to report improper usage of the operator symbol .op.? write ( *, * ) .op. 42 block interface operator ( .op. ) pure integer function F ( N ) integer, intent(in) :: N end function F end interface end block ANSWER: 1.5p2(6) says a processor conforms to this part of ISO/IEC 1539 if: ... " (6) 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 16;" The label "10" is not a name, so a conforming processor is not required to report this improper usage. Further, branching into a construct from outside it is prohibited in Clause 8, not clause 16. The operator symbol .op. is not a name, so a conforming processor is not required to report this improper usage. It was intended that a conforming processor be required to report these improper usages, and ones involving assignment symbols. Edits are provided to correct this oversight. ALTERNATIVE ANSWER: 1.5p2(6) says a processor conforms to this part of ISO/IEC 1539 if: ... " (6) 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 16;" The label "10" is not a name, so a conforming processor is not required to report this improper usage. Further, branching into a construct from outside it is prohibited in Clause 8, not clause 16. The operator symbol .op. is not a name, so a conforming processor is not required to report this improper usage. It was not intended that a conforming processor be required to report these improper usages, and ones involving assignment symbols. Edits are provided to correct this oversight. EDITS: [14-007r2:23:23-25 1.52(6)] Replace "name" with "identifier". Replace "Clause 16" with "Clauses 8 and 16". ALTERNATIVE EDITS: [14-007r2:23:24 1.52(6)] Remove ", labels, operators, and assignment symbols". SUBMITTED BY: Van Snyder HISTORY: 14-xxx m206 F08/nnnn submitted ---------------------------------------------------------------------- Alternative edits for non-interp change: [14-007r2:xv Introduction somwhere] "o A conforming processor is required to report improper identifier usage that does not conform to rules in Clauses 8 and 16, not simply improper name usage that does not conform to rules in Clause 16." [14-007r2:23:23-25 1.52(6)] Replace "name" with "identifier". Replace "Clause 16" with "Clauses 8 and 16". {This would make it irrelevant to constrain branching into a construct from outwith it, as advocated in 14-242r1.}