Skip to content

Conversation

@philnik777
Copy link
Contributor

We only use _LIBCPP_DISABLE_EXTENSION_WARNINGS in a single place while we use extensions all over the place. The warnings are already disabled, since libc++'s headers are system headers, so this shouldn't be in any way observable by users.

@philnik777 philnik777 marked this pull request as ready for review April 2, 2025 13:39
@philnik777 philnik777 requested a review from a team as a code owner April 2, 2025 13:39
@philnik777 philnik777 merged commit d8d561a into llvm:main Apr 2, 2025
82 checks passed
@philnik777 philnik777 deleted the remove_disable_extension branch April 2, 2025 13:40
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Apr 2, 2025
@llvmbot
Copy link
Member

llvmbot commented Apr 2, 2025

@llvm/pr-subscribers-libcxx

Author: Nikolas Klauser (philnik777)

Changes

We only use _LIBCPP_DISABLE_EXTENSION_WARNINGS in a single place while we use extensions all over the place. The warnings are already disabled, since libc++'s headers are system headers, so this shouldn't be in any way observable by users.


Full diff: https://github.com/llvm/llvm-project/pull/133693.diff

3 Files Affected:

  • (modified) libcxx/.clang-format (-1)
  • (modified) libcxx/include/__atomic/support/c11.h (+1-1)
  • (modified) libcxx/include/__config (-2)
diff --git a/libcxx/.clang-format b/libcxx/.clang-format
index f548119652c19..a6154c7c4a2bc 100644
--- a/libcxx/.clang-format
+++ b/libcxx/.clang-format
@@ -30,7 +30,6 @@ AttributeMacros: [
                   '_LIBCPP_DEPRECATED_IN_CXX20',
                   '_LIBCPP_DEPRECATED_IN_CXX23',
                   '_LIBCPP_DEPRECATED',
-                  '_LIBCPP_DISABLE_EXTENSION_WARNING',
                   '_LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION',
                   '_LIBCPP_EXPORTED_FROM_ABI',
                   '_LIBCPP_EXTERN_TEMPLATE_TYPE_VIS',
diff --git a/libcxx/include/__atomic/support/c11.h b/libcxx/include/__atomic/support/c11.h
index 177a075be4073..1ad299882a12a 100644
--- a/libcxx/include/__atomic/support/c11.h
+++ b/libcxx/include/__atomic/support/c11.h
@@ -35,7 +35,7 @@ struct __cxx_atomic_base_impl {
   }
 #endif // _LIBCPP_CXX03_LANG
   _LIBCPP_CONSTEXPR explicit __cxx_atomic_base_impl(_Tp __value) _NOEXCEPT : __a_value(__value) {}
-  _LIBCPP_DISABLE_EXTENSION_WARNING _Atomic(_Tp) __a_value;
+  _Atomic(_Tp) __a_value;
 };
 
 #define __cxx_atomic_is_lock_free(__s) __c11_atomic_is_lock_free(__s)
diff --git a/libcxx/include/__config b/libcxx/include/__config
index ea51d30dcda99..35e62d0a19e85 100644
--- a/libcxx/include/__config
+++ b/libcxx/include/__config
@@ -352,8 +352,6 @@ typedef __char32_t char32_t;
 
 #  define _LIBCPP_ALWAYS_INLINE __attribute__((__always_inline__))
 
-#  define _LIBCPP_DISABLE_EXTENSION_WARNING __extension__
-
 #  if defined(_LIBCPP_OBJECT_FORMAT_COFF)
 
 #    ifdef _DLL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants