[libcxx-commits] [libcxx] r370889 - [libc++] Use __extension__ in a portable manner
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Sep 4 05:44:19 PDT 2019
Author: ldionne
Date: Wed Sep 4 05:44:19 2019
New Revision: 370889
URL: http://llvm.org/viewvc/llvm-project?rev=370889&view=rev
Log:
[libc++] Use __extension__ in a portable manner
Modified:
libcxx/trunk/include/__config
libcxx/trunk/include/atomic
Modified: libcxx/trunk/include/__config
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__config?rev=370889&r1=370888&r2=370889&view=diff
==============================================================================
--- libcxx/trunk/include/__config (original)
+++ libcxx/trunk/include/__config Wed Sep 4 05:44:19 2019
@@ -485,6 +485,8 @@ typedef __char32_t char32_t;
#define _LIBCPP_HAS_NO_CXX20_CHRONO_LITERALS
#endif
+#define _LIBCPP_DISABLE_EXTENSION_WARNING __extension__
+
#elif defined(_LIBCPP_COMPILER_GCC)
#define _ALIGNAS(x) __attribute__((__aligned__(x)))
@@ -520,6 +522,8 @@ typedef __char32_t char32_t;
#define _LIBCPP_ALWAYS_INLINE __attribute__ ((__always_inline__))
+#define _LIBCPP_DISABLE_EXTENSION_WARNING __extension__
+
#elif defined(_LIBCPP_COMPILER_MSVC)
#define _LIBCPP_TOSTRING2(x) #x
@@ -545,6 +549,8 @@ typedef __char32_t char32_t;
#define _LIBCPP_HAS_NO_VECTOR_EXTENSION
+#define _LIBCPP_DISABLE_EXTENSION_WARNING
+
#elif defined(_LIBCPP_COMPILER_IBM)
#define _ALIGNAS(x) __attribute__((__aligned__(x)))
@@ -565,6 +571,8 @@ typedef __char32_t char32_t;
#define _LIBCPP_HAS_NO_VECTOR_EXTENSION
+#define _LIBCPP_DISABLE_EXTENSION_WARNING
+
#endif // _LIBCPP_COMPILER_[CLANG|GCC|MSVC|IBM]
#if defined(_LIBCPP_OBJECT_FORMAT_COFF)
Modified: libcxx/trunk/include/atomic
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/atomic?rev=370889&r1=370888&r2=370889&view=diff
==============================================================================
--- libcxx/trunk/include/atomic (original)
+++ libcxx/trunk/include/atomic Wed Sep 4 05:44:19 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) {}
- __extension__ _Atomic(_Tp) __a_value;
+ _LIBCPP_DISABLE_EXTENSION_WARNING _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