We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#include <assert.h> #include <pthread.h> static _Thread_local int x; void* thread_fn(void* arg) { x = 1; return NULL; } int main(void) { x = 0; pthread_t thread; int err = pthread_create(&thread, NULL, thread_fn, NULL); assert(err == 0); void* ret; err = pthread_join(thread, &ret); assert(err == 0); assert(ret == NULL); assert(x == 0); return 0; }
This program works with GCC/clang but breaks with c2m (at assert(x == 0);). It appears that _Thread_local is not implemented.
c2m
assert(x == 0);
_Thread_local
The text was updated successfully, but these errors were encountered:
the feature relies on libc and libpthread to co-operate, which is hard for MIR to do.
Sorry, something went wrong.
No branches or pull requests
This program works with GCC/clang but breaks with
c2m
(atassert(x == 0);
). It appears that_Thread_local
is not implemented.The text was updated successfully, but these errors were encountered: