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

2024-11-11


869. Uninitialized thread_local objects

Section: 9.4  [dcl.init]     Status: CD2     Submitter: Daniel Krügler     Date: 14 April, 2009

[Voted into WP at March, 2010 meeting.]

9.4 [dcl.init] paragraph 11 says,

If no initializer is specified for an object, the object is default-initialized; if no initialization is performed, a non-static object has indeterminate value.

This is inaccurate, because objects with thread storage duration are zero-initialized (6.9.3.2 [basic.start.static] paragraph 2).

Proposed resolution (November, 2009):

Change 9.4 [dcl.init] paragraph 11 as follows:

If no initializer is specified for an object, the object is default-initialized; if no initialization is performed, a non-static an object with automatic or dynamic storage duration has indeterminate value. [Note: objects with static or thread storage duration are zero-initialized, see 6.9.3.2 [basic.start.static].end note].