Does clang++ do threadsafe initialisation of local static variables?
GCC does, unless you turn it off with the misleadingly named -fno-threadsafe-statics.
I’m using Apple clang version 2.0 (tags/Apple/clang-139) (based on LLVM 2.9svn).
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, same as with GCC (so can also be turned off with
-fno-threadsafe-statics)