Skip to content

[Support] Remove ciso646 include #123578

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 23, 2025
Merged

[Support] Remove ciso646 include #123578

merged 1 commit into from
Jan 23, 2025

Conversation

nikic
Copy link
Contributor

@nikic nikic commented Jan 20, 2025

This header has been removed in C++20 and causes a large amount of deprecation spam when building against libstdc++ 15 in C++17 mode.

As far as I understand, we just need to include some STL header to get access to the version macros, and as this header also includes nowadays we can just drop the include entirely.

This header has been removed in C++20 and causes a large amount
of deprecation spam when building against libstdc++ 15 in C++17
mode.

As far as I understand, we just need to include *some* STL header
to get access to the version macros, and as this header also
includes <optional> nowadays we can just drop the <cstd646>
include entirely.
@llvmbot
Copy link
Member

llvmbot commented Jan 20, 2025

@llvm/pr-subscribers-llvm-support

Author: Nikita Popov (nikic)

Changes

This header has been removed in C++20 and causes a large amount of deprecation spam when building against libstdc++ 15 in C++17 mode.

As far as I understand, we just need to include some STL header to get access to the version macros, and as this header also includes <optional> nowadays we can just drop the <cstd646> include entirely.


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

1 Files Affected:

  • (modified) llvm/include/llvm/Support/Threading.h (-1)
diff --git a/llvm/include/llvm/Support/Threading.h b/llvm/include/llvm/Support/Threading.h
index d8e2cb0514ddd7..01e26ad9b858ea 100644
--- a/llvm/include/llvm/Support/Threading.h
+++ b/llvm/include/llvm/Support/Threading.h
@@ -18,7 +18,6 @@
 #include "llvm/ADT/StringRef.h"
 #include "llvm/Config/llvm-config.h" // for LLVM_ON_UNIX
 #include "llvm/Support/Compiler.h"
-#include <ciso646> // So we can check the C++ standard lib macros.
 #include <optional>
 
 #if defined(_MSC_VER)

@nikic nikic merged commit d8eb4ac into llvm:main Jan 23, 2025
10 checks passed
@nikic nikic deleted the remove-ciso646 branch January 23, 2025 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants