T o: J3 J3/14-191r1 From: Van Snyder and Nick Maclaren Subject: Delete and Range of the DO construct Date: 2014 June 25 References: 14-007r1, 14-166 1. Introduction =============== In 14-166, Malcolm recommended to delete the syntax term and the "Range of the DO construct" subclause. We can't delete the "Range of the DO construct" subclause without replacing references to "the range of the loop" with "the of the loop" in several places, and prohibiting branching to the from outside the construct. Sections 3 and 4 describe this change. Section 5 includes a proposal to forbid branching to all end construct statements from outside the construct and make it a constraint. This could be regarded as fixing a historical defect. It is additional to the previous sections. 2. Specification ================ Delete the syntactic term and the "Range of the DO construct" subclause. Optionally, add a constraint to forbid branching to all end-construct statements from outside their construct. Currently, it is not forbidden for all of them, and is not a constraint in any case. 3. Edits to 14-007r1 ==================== [xviii] Introduction Add to the bullet "Data usage and computation" the sentence "Branching to the end statement of an executable construct containing a block from outside the construct now requires a diagnostic." [174:14 R813] Replace "" with "". [175:5 R823] Delete R823 (the syntax rule). subclause by "It is permitted to branch to the of a DO construct only from within that DO construct." [175:15 8.1.6.3p1] Replace "" with " of the ". [176:3 8.1.6.5.1p2] Replace "" with "". In Annex D, so omit if deleted [593 R813] Replace "" with "". 4. Replacing "range" ==================== [46:25-26] Replace "range" with "", twice. [174:9 8.1.6.1p3] Replace "range" with "". [175:14-17 81.6.3p0+] Replace "Range of the DO construct" subclause by "It is permitted to branch to the of a DO construct only from within that DO construct." [176:34 8.1.6.5.3p1(2)] Replace "range" with "". [177:5-6 8.1.6.5.3p3] Replace "range" with "", twice. [177:8 8.1.6.5.4p1] Replace "" with "". [177:8-9 8.1.6.5.4p1] Replace " of the loop" with " of the construct". [177:11-12 C822] Replace "range" with "", twice. [177:29 8.1.6.5.5p1] Replace "range" with "". [177:31-33 8.1.6.5.5p1] Replace "range" with "", thrice. [178:23+5 Note 8.11] Replace "range" with "". [179:0+12 Note 8.14] Replace "range" with "". [179:0+25 Note 8.15] Replace "range" with "". [186:5 C846] Replace "range" with "". [222:5 9.6.4.5.1p9] PROBLEM: I don't know what to do here In Annex D, so omit if deleted [594 C822] Replace "range" with "", twice. [596 C846] Replace "range" with "". 5. Constraining against branching to from outside its construct ======================================================== Subclause 8.1.6.3 "Range of the DO construct" prohibits branching to an statement from outside the construct, but it is not a constraint. Prohibitions against branching to an , , , or are not constraints, and are not in the subclause on branching. There is no prohibition against branching to an or from outside its construct (nor is there explicit permission for it, as there once was for END IF). This could be regarded as a historical defect. If it is wished to change this, the following changes need to be made: The above edit [175:14-17 81.6.3] Replace "Range of the DO construct" ... should be replaced by the edit [175:14-17 81.6.3] Delete "Range of the DO construct" subclause [25:10+ 1.6.3p1+] Within the list of incompatibilities with Fortran 2008, add a list item: "Fortran 2008 did not prohibit branching to an or from outside its construct. This standard prohibits branching to those, and a diagnostic is required for those and other similar cases." [187:12+ 8.2.1p1+] Insert a constraint: "C847a If a branch target statement is an , , , , , , or , the branching statement that references the label of that branch target statement shall be within the construct completed by that branch target statement." [170:35 8.1.3.2p3] Delete the paragraph. [180:29-30 8.1.7.2p2] Delete the paragraph. [182:33 8.1.8.2p3] Delete the paragraph. [185:33 8.1.9.2p9] Delete the paragraph.