[Issue 15523] extern(C++) support TLS (C++ 'thread_local') linkage?
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Jan 8 01:29:09 PST 2016
https://issues.dlang.org/show_bug.cgi?id=15523
--- Comment #4 from Manu <turkeyman at gmail.com> ---
I would suggest that since 'thread_local' is C++11 standard, then that should
be the one.
Since '__thread' is not standard, I imagine it would be best supported by
GDC(/Clang?) via the @attribute("__thread") mechanism that they support for
their compiler-specific attributes.
extern(C++):
// Standard:
extern int i; // thread_local
// GCC(/Clang?):
@attribute("__thread") extern int i; // __thread (this is probably very easy
for those toolchains to implement)
--
More information about the Digitalmars-d-bugs
mailing list