Movatterモバイル変換


[0]ホーム

URL:


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

2025-12-20


631. Jumping into a “then” clause

Section:8.5.2  [stmt.if]    Status:CD3    Submitter:James Kanze    Date:24 April 2007

[Moved to DR at the October, 2012 meeting.]

8.5.2 [stmt.if] is silent about whether theelseclause of anif statement is executed if the condition is notevaluated. (This could occur via agoto or alongjmp.)C99 covers thegoto case with the following provision:

If the first substatement is reached via a label, the secondsubstatement is not executed.

It should probably also be stated that the condition is notevaluated when the “then” clause is entered directly.

Proposed resolution (February, 2012):

Change 8.5.2 [stmt.if] paragraph 1 as follows:

If the condition (8.5 [stmt.select]) yieldstrue thefirst substatement is executed. If theelse part of theselection statement is present and the condition yieldsfalse, the second substatement is executed.If the firstsubstatement is reached via a label, the condition is not evaluatedand the second substatement is not executed. In the secondform...



[8]ページ先頭

©2009-2026 Movatter.jp