Title
thread_local vs block extern declarations
Status
c++14
Section
9.2.2 [dcl.stc]
Submitter
Richard Smith

Created on 2013-04-12.00:00:00 last changed 121 months ago

Messages

Date: 2013-09-15.00:00:00

[Moved to DR at the September, 2013 meeting.]

Date: 2013-04-15.00:00:00

Proposed resolution (April, 2013):

When thread_local is applied to a variable of block scope the storage-class-specifier static is implied if it does not appear explicitly no other storage-class-specifier appears in the decl-specifier-seq.
Date: 2013-04-12.00:00:00

According to 9.2.2 [dcl.stc] paragraph 4,

When thread_local is applied to a variable of block scope the storage-class-specifier static is implied if it does not appear explicitly.

This, presumably unintentionally, prohibits a declaration like

  void f() {
    extern thread_local int n;
  }
History
Date User Action Args
2014-11-24 00:00:00adminsetstatus: drwp -> c++14
2014-03-03 00:00:00adminsetstatus: dr -> drwp
2013-10-14 00:00:00adminsetmessages: + msg4683
2013-10-14 00:00:00adminsetstatus: ready -> dr
2013-05-03 00:00:00adminsetmessages: + msg4310
2013-04-12 00:00:00admincreate