To: J3 09-224r3 From: Dan Nagle Subject: Allow return back to a block Date: 2009 May 07 Paper 09-176r1 remarks that, due to definitions of "transfer of control" and the prohibition on transfers of control into a block, technically, a program cannot return to a block from a subprogram referenced within a block. The repair proposed in 09-176 involves changing the definition of branch, and tracing the results of that change throughout the standard. Subgroup is reluctant to make so sweeping a change at this date in the revision cycle, so a more modest change is proposed to repair the defect. Edits: [171:20 8.1.2.1p1] ----------------------------------------------------- Editor: Replace "Transfer of control" by "Branching (8.2)" because "transfer of control" prohibits procedures from returning. Alternative returns are branches, so "Branching" covers that case correctly. 8.2.1 explicitly says that there are transfers of control that are not branches. The two other occurrences of "transfers" in this paragraph are correct. [176:42 8.1.6.4p2] ----------------------------------------------------- Editor: Replace "Transfer of control" by "Branching (8.2)" because "transfer of control" prohibits procedures from returning. Index this occurrence of "branch" (this occurrence of "transfer of control" is not currently indexed). [178:20-23 8.1.6.6.3p5]------------------------------------------------- Editor: Replace the first "transfer of control" by "branch (8.2)" the second by "branching" or "a branch". Index these occurrences of "branch" (these occurrences of "transfer of control" are not currently indexed). [178:22 8.1.6.6.3p5] Change "Unless a further transfer of control results," to "Unless termination of control or a further transfer of control occurs," [188:3-4 8.2.1p1] ------------------------------------------------------ Editor: Replace the first two sentences ("Branching ... same scoping unit") to use the definition of execution sequence in 2.3.5: "A branch alters the normal execution sequence (2.3.5). When a branch occurs, the next statement executed is the branch target statement, in the same scoping unit, that is labeled by the label in the branch, instead of the one that would be executed by continuing the normal execution sequence." [188:7 8.2.1p1] -------------------------------------------------------- Editor: Replace "cause transfer of control" by "change the normal execution sequence". [188:16-17 8.2.2p1] ---------------------------------------------------- Editor: Replace the paragraph by: "Execution of a GO TO statement causes a branch to the branch target statement identified by the label." [188:23 8.2.3p1] ------------------------------------------------------- Editor: Replace "a transfer of control ... is the one" by "a branch occurs to the branch target statement" [188:31-32 8.2.4p1] ---------------------------------------------------- Editor: Replace "transfer of control" by "branch". Insert "is the one" before "identified". Replace "is executed next" by a comma. The result is "The branch target statement is the one identified by the first label, the second label, or the third label, depending on...." [313:29-30 12.6.2.7p1] ------------------------------------------------- Editor: Replace "transfers control to the" by "branches (8.2) to the branch target". Replace "transfer of control" by "branch". Index these appearances of "branch".