J3/09-291 To: J3 Subject: CRITICAL construct, EXIT, CYCLE, RETURN, image control statement From: Van Snyder Date: 2009 September 10 1. Introduction --------------- At 189 we changed C811 to prohibit branching out of a CRITICAL construct by using EXIT or CYCLE. Reviewing this led to some further questions. Other than the processor having to generate the "turn off the lock" code for every EXIT, CYCLE, RETURN or branch that exits the construct, is there really a problem to allow leaving a critical construct other than by executing its END CRITICAL statement? (Yeah, assigned GO TO would have been a problem, but that's gone now.) There is no constraint against nesting DO CRITICAL constructs. Nesting them is, of course, silly, because only one image is in the outer CRITICAL construct. Assuming there is a problem with exiting the outer one, is there any problem at all with exiting an inner one other than by executing its END CRITICAL statement if the outer one isn't exited? Is executing an EXIT statement that is owned by a CRITICAL construct actually a problem? One can, of course, achieve the same effect by exiting a BLOCK whose END BLOCK statement immediately precedes the END CRITICAL statement, or by branching to the END CRITICAL statement. Should we prohibit RETURN in DO CONCURRENT (and CRITICAL) by a constraint on RETURN instead of one on DO CONCURRENT (and CRITICAL), to be consistent with how we constrain EXIT and CYCLE? Should the prohibition on image control statements appearing (or being executed) from within DO CONCURRENT and CRITICAL be done in 8.5.1 instead of in 8.1.5 and 8.1.6.7? 2. No problem leaving CRITICAL other than by END CRITICAL --------------------------------------------------------- [172:21 8.1.5 C810]----------------------------------------------------- Editor: Delete "a RETURN statement or". [172:23-25 8.1.5 C811]-------------------------------------------------- Editor: Delete C811. {09-290 edits C811.} 3. Constraining RETURN in 12.6.2.7 ----------------------------------- [172::21 8.1.5 C810]---------------------------------------------------- Editor: Delete "a RETURN statement or". [177:9 8.1.6.7 C822]---------------------------------------------------- Editor: Delete C822 [311:17+ 12.6.2.7 C1270+]----------------------------------------------- Editor: Insert a constraint: "C1270a (R1241) A shall not appear within a CRITICAL or DO CONCURRENT construct." or "C1270a (R1241) A shall not appear within a DO CONCURRENT construct." if section 2 is done.