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

2024-12-19


1415. Missing prohibition of block-scope definition of extern object

Section: 6.6  [basic.link]     Status: CD3     Submitter: Richard Smith     Date: 2011-11-13

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

There does not appear to be wording that prohibits a block-scope extern object declaration from being a definition.

Proposed resolution (February, 2012):

Add the following as a new paragraph following 9.4 [dcl.init] paragraph 4:

[Note: Default arguments are more restricted; see 9.3.4.7 [dcl.fct.default].

The order of initialization of variables with static storage duration is described in 6.9.3 [basic.start] and 8.8 [stmt.dcl]. —end note]

A declaration of a block-scope variable with external or internal linkage that has an initializer is ill-formed.

To zero-initialize an object...