To: J3 J3/18-204 From: Malcolm Cohen Subject: Country comment JP072 Date: 2018-June-12 1. Introduction The statements "EXIT simulation" on the 3rd line from the bottom of p.559 and on the 9th line of p.560 violate the restriction C1167 because they belong to the CHANGE TEAM construct. A GOTO statement branching to the statement "END TEAM simulation" can be used instead. In the second case, "EXIT iter" could be used instead. While examining this example, subgroup noticed an additional syntax error which needs to be fixed. 2. Discussion (or "GOTO considered harmful") One would expect that the statement "EXIT change-team-construct" would merely transfer control to the END TEAM statement, the same effect as "EXIT block-construct" or "EXIT if-construct". Requiring the user to put a statement label on the END TEAM construct and have a GOTO that label is absurd. Similarly for the CRITICAL construct. The words for the EXIT statement in the standard say that it "completes execution of the construct" which means it should act exactly like transferring control to the END TEAM (or END CRITICAL) statement. 3. Proposed technical change Introduction, "Features previously described by ISO/IEC TS 18508:2015" bullet, append sentence "An EXIT statement can be used to complete execution of a CHANGE TEAM or CRITICAL construct." Page 204, 11.1.12 EXIT statement, C1167, split into two constraints "C1167 An exit-stmt shall not appear within a DO CONCURRENT construct if it belongs to that construct or an outer construct. C1167a An exit-stmt shall not appear within a CHANGE TEAM or CRITICAL construct if it belongs to an outer construct." 4. Alternative ugly example hackery Page 559, C.6.8 Example involving failed images, p2, Change "IF (status == STAT_FAILED_IMAGE) EXIT simulation" to "IF (status == STAT_FAILED_IMAGE) GO TO 999" Page 560, same example, Change the whole line "EXIT simulation" to "EXIT iter". Change " END TEAM simulation (STAT=status)" to "999 END TEAM simulation (STAT=status)" 5. Additional edit Same example, Change "END TEAM simulation (STAT=status)" to "END TEAM (STAT=status) simulation" {Fix BNF violation.} ===END===