On Fri, 12 Oct 2012, Jason Merrill wrote: > > Consider instead the following expansion: > > > > __thread void (*i_initialize)(void) = i_init; > > That would work too, though it wouldn't have the benefit of link-compatibility > with __thread (for variables that don't need dynamic initialization) that the > current scheme has.
I'd certainly think that for C, __thread and _Thread_local should be link-compatible (and probably should be treated more or less identically apart from some diagnostics), and that C11 _Thread_local should be link-compatible (in the absence of dynamic initialization) with C++11 thread_local. -- Joseph S. Myers jos...@codesourcery.com