Title
Redeclaration of names in init-statements
Status
nad
Section
8.5 [stmt.select]
Submitter
John Spicer

Created on 2017-04-19.00:00:00 last changed 47 months ago

Messages

Date: 2019-01-15.00:00:00

Rationale (January, 2019):

The init-statement case is covered by 6.4.3 [basic.scope.block] paragraph 3. These two references should be harmonized and cross-referenced appropriately as an editorial change.

Date: 2018-04-15.00:00:00

Notes from the April, 2018 teleconference:

CWG agreed that such a rule should be added.

Date: 2020-12-15.00:00:00

According to Clause 8 [stmt.stmt] paragraph 3,

A name introduced by a declaration in a condition (either introduced by the decl-specifier-seq or the declarator of the condition) is in scope from its point of declaration until the end of the substatements controlled by the condition. If the name is redeclared in the outermost block of a substatement controlled by the condition, the declaration that redeclares the name is ill-formed.

Should there be a similar rule about redeclaring names introduced by init-statements?

History
Date User Action Args
2020-12-15 00:00:00adminsetmessages: + msg6297
2020-12-15 00:00:00adminsetstatus: drafting -> nad
2018-04-11 00:00:00adminsetmessages: + msg6195
2018-04-11 00:00:00adminsetstatus: open -> drafting
2017-04-19 00:00:00admincreate