[libcxx-commits] [libcxx] r370796 - [libc++] Mark usage of _Atomic with __extension__

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Tue Sep 3 10:52:18 PDT 2019


Author: ldionne
Date: Tue Sep  3 10:52:18 2019
New Revision: 370796

URL: http://llvm.org/viewvc/llvm-project?rev=370796&view=rev
Log:
[libc++] Mark usage of _Atomic with __extension__

An upcoming change in Clang will flag _Atomic as being a C11 extension.
To avoid generating this warning in libc++, this commit marks the only
use of _Atomic with the __extension__ extension, which suppresses such
warnings.

Modified:
    libcxx/trunk/include/atomic

Modified: libcxx/trunk/include/atomic
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/atomic?rev=370796&r1=370795&r2=370796&view=diff
==============================================================================
--- libcxx/trunk/include/atomic (original)
+++ libcxx/trunk/include/atomic Tue Sep  3 10:52:18 2019
@@ -920,7 +920,7 @@ struct __cxx_atomic_base_impl {
 #endif // _LIBCPP_CXX03_LANG
   _LIBCPP_CONSTEXPR explicit __cxx_atomic_base_impl(_Tp value) _NOEXCEPT
     : __a_value(value) {}
-  _Atomic(_Tp) __a_value;
+  __extension__ _Atomic(_Tp) __a_value;
 };
 
 #define __cxx_atomic_is_lock_free(__s) __c11_atomic_is_lock_free(__s)




More information about the libcxx-commits mailing list