Author: dim
Date: Sun Jun 12 11:45:45 2016
New Revision: 301839
URL: https://svnweb.freebsd.org/changeset/base/301839

Log:
  MFC r300967:
  
  Stop exposing the C11 _Atomic() macro in <sys/cdefs.h>, when compiling
  for C++.  It clashes with the one in libc++'s <atomic> header.
  
  (Previously, the _Atomic() macro was defined in <stdatomic.h>, which is
  only for use with C11, but for various reasons it was moved to its
  current location in r251804.)
  
  Discussed with:       bdrewery, ed

Modified:
  stable/10/sys/sys/cdefs.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/sys/cdefs.h
==============================================================================
--- stable/10/sys/sys/cdefs.h   Sun Jun 12 11:13:38 2016        (r301838)
+++ stable/10/sys/sys/cdefs.h   Sun Jun 12 11:45:45 2016        (r301839)
@@ -273,7 +273,8 @@
 #define        _Alignof(x)             __alignof(x)
 #endif
 
-#if !__has_extension(c_atomic) && !__has_extension(cxx_atomic)
+#if !defined(__cplusplus) && !__has_extension(c_atomic) && \
+    !__has_extension(cxx_atomic)
 /*
  * No native support for _Atomic(). Place object in structure to prevent
  * most forms of direct non-atomic access.
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to