[cfe-dev] status of 'thread_local'

Tim Northover t.p.northover at gmail.com
Tue Oct 16 13:47:52 PDT 2012


On Tue, Oct 16, 2012 at 9:40 PM, James Gregurich <bayoubengal at me.com> wrote:
> Is it C-only? I ran a test with C++ and it didn't work.

It shouldn't be. I ran a test with C++ and it *did* work. Or, at least
it gave correct LLVM IR (and correct assembly).

My (C++) test was:

__thread int foo;

int bar() {
    return foo;
}

Compiled with bog-standard C++ options this worked fine. Could you
tell us what you thought was wrong with your output?

Cheers.

Tim.



More information about the cfe-dev mailing list