This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 110b. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2023-01-15


246. Jumps in function-try-block handlers

Section: 13.4  [temp.arg]     Status: CD1     Submitter: Mike Miller     Date: 15 Sep 2000

[Moved to DR at 4/01 meeting.]

Is it permitted to jump from a handler of a function-try-block into the body of the function?

Clause 14 [except] paragraph 2 would appear to disallow such a jump:

A goto, break, return, or continue statement can be used to transfer control out of a try block or handler, but not into one.

However, 14.4 [except.handle] paragraph 14 mentions only constructors and destructors for the prohibition:

If the handlers of a function-try-block contain a jump into the body of a constructor or destructor, the program is ill-formed.

Is this paragraph simply reemphasizing the more general restriction, or does it assume that such a jump would be permitted for functions other than constructors or destructors? If the former interpretation is correct, it is confusing and should be either eliminated or turned into a note. If the latter interpretation is accurate, Clause 14 [except] paragraph 2 must be revised.

(See also issue 98.)

Proposed resolution (04/01):

Delete 14.4 [except.handle] paragraph 14.