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


1869. thread_local vs linkage-specifications

Section: 9.11  []     Status: NAD     Submitter: Richard Smith     Date: 2014-02-14

According to 9.11 [] paragraph 7,

A declaration directly contained in a linkage-specification is treated as if it contains the extern specifier (9.2.2 []) for the purpose of determining the linkage of the declared name and whether it is a definition. Such a declaration shall not specify a storage class.

This prohibits a declaration like

  extern "C++" thread_local int n;

Should this be changed?

Rationale (June, 2014):

This restriction is the same for static and simply requires that the braced form of linkage-specification be used.