svn commit: r270994 - head/sys/sys
Ed Schouten
ed at FreeBSD.org
Wed Sep 3 06:34:17 UTC 2014
Author: ed
Date: Wed Sep 3 06:34:16 2014
New Revision: 270994
URL: http://svnweb.freebsd.org/changeset/base/270994
Log:
Partially revert r270964. Don't test for C++11 to define _Thread_local.
In addition to Clang 3.3, it turns out that GCC 4.7 in Ports also does
not support the _Thread_local keyword. Let's document this in a bit more
detail.
Reported by: antoine@
Modified:
head/sys/sys/cdefs.h
Modified: head/sys/sys/cdefs.h
==============================================================================
--- head/sys/sys/cdefs.h Wed Sep 3 06:25:34 2014 (r270993)
+++ head/sys/sys/cdefs.h Wed Sep 3 06:34:16 2014 (r270994)
@@ -298,7 +298,12 @@
#endif
#if !__has_extension(c_thread_local)
-#if (defined(__cplusplus) && __cplusplus >= 201103L) || \
+/*
+ * XXX: Some compilers (Clang 3.3, GCC 4.7) falsely announce C++11 mode
+ * without actually supporting the thread_local keyword. Don't check for
+ * the presence of C++11 when defining _Thread_local.
+ */
+#if /* (defined(__cplusplus) && __cplusplus >= 201103L) || */ \
__has_extension(cxx_thread_local)
#define _Thread_local thread_local
#else
More information about the svn-src-head
mailing list