Apple OS X clang does not support thread_local keyword
authorkhizmax <khizmax@gmail.com>
Tue, 17 Mar 2015 13:56:46 +0000 (16:56 +0300)
committerkhizmax <khizmax@gmail.com>
Tue, 17 Mar 2015 13:56:46 +0000 (16:56 +0300)
cds/compiler/clang/defs.h

index 8b649d10e8e2be0d44b75fdf960cbfd803038e09..182a5b8302c7b04db750bd1e381306527f360735 100644 (file)
 #define CDS_NOEXCEPT_SUPPORT_(expr) noexcept(expr)
 
 // C++11 thread_local keyword
-#define CDS_CXX11_THREAD_LOCAL_SUPPORT
+#if !(CDS_OS_TYPE == CDS_OS_OSX && CDS_COMPILER_VERSION < 30600)
+    // OS X error? 
+    // See http://stackoverflow.com/questions/23791060/c-thread-local-storage-clang-503-0-40-mac-osx
+    // http://stackoverflow.com/questions/28094794/why-does-apple-clang-disallow-c11-thread-local-when-official-clang-supports
+    // clang 3.6 ok?..
+#   define CDS_CXX11_THREAD_LOCAL_SUPPORT
+#endif
 
 // Full SFINAE support
 #define CDS_CXX11_SFINAE