Skip to content

[Support] Remove ciso646 include#123578

Merged
nikic merged 1 commit intollvm:mainfrom
nikic:remove-ciso646
Jan 23, 2025
Merged

[Support] Remove ciso646 include#123578
nikic merged 1 commit intollvm:mainfrom
nikic:remove-ciso646

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
schilkp pushed a commit to schilkp/llvm-project that referenced this pull request Jun 10, 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
<optional> nowadays we can just drop the <cstd646> include entirely.
schilkp pushed a commit to EPFL-LAP/llvm-project that referenced this pull request Jun 13, 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
<optional> nowadays we can just drop the <cstd646> include entirely.
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