Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Sep 2014 06:34:17 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r270994 - head/sys/sys
Message-ID:  <201409030634.s836YHEG036747@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409030634.s836YHEG036747>