diff options
author | ed <ed@FreeBSD.org> | 2014-09-03 06:34:16 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2014-09-03 06:34:16 +0000 |
commit | 1e5625134a32637e7ecfc53219d23d79141f7fd9 (patch) | |
tree | 9c9a90e35563dd4a8fda30d7ce379fcd7a59fc17 | |
parent | 25686bf39b4af295921d0360845a60f7009370d5 (diff) | |
download | FreeBSD-src-1e5625134a32637e7ecfc53219d23d79141f7fd9.zip FreeBSD-src-1e5625134a32637e7ecfc53219d23d79141f7fd9.tar.gz |
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@
-rw-r--r-- | sys/sys/cdefs.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index d00d7ad..7af7e38 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -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 |