This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Functions that are CSEable but not pure


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
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]