This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 110c. See for the official list.


227. How many scopes in an if statement?

Section: 8.5  []     Status: TC1     Submitter: Marc Paterno     Date: 21 Apr 2000

The wording of 8.5 [] paragraph 1 is misleading. Instead of

The substatement in a selection-statement (both substatements, in the else form of the if statement) implicitly defines a local scope (6.4 [basic.scope]).

it should say

... each substatement, in the else form...

As is, one is left with the impression that both "then" and "else" clauses together form a single scope.

Proposed resolution (10/00): As suggested.