Merge bitcoin/bitcoin#28349: build: Require C++20 compiler#632
Merge bitcoin/bitcoin#28349: build: Require C++20 compiler#632DashCoreAutoGuix wants to merge 1 commit into
Conversation
fa6e50d fuzz: Use C++20 starts_with in rpc.cpp (MarcoFalke) faa4838 Revert "tracepoints: Disables `-Wgnu-zero-variadic-macro-arguments` to compile without warnings" (MarcoFalke) fae3b77 refactor: Drop unused _Pragma to ignore -Wgnu-zero-variadic-macro-arguments (MarcoFalke) fa02fc0 refactor: modernize-use-default-member-init for bit-fields (C++20) (MarcoFalke) fa67f09 build: Require C++20 compiler (MarcoFalke) Pull request description: C++20 allows to write safer code, because it allows to enforce more stuff at compile time (`constinit`, `conteval`, `constexpr`, `std::span`, ...). Also, it allows to write less verbose and easier to understand code (C++ 20 Concepts). See bitcoin#23363 and https://en.cppreference.com/w/cpp/compiler_support#cpp20 With g++-10 (bitcoin#28348) and clang-13 (bitcoin#28210), there is broad support for almost all features of C++20. It should be fine to require a C++20 compiler for Bitcoin Core 27.0 in 2024 (next year), not the soon upcoming 26.0 next month. This pull request includes three small cleanups to make use of C++20 features. If any issues are detected before or after merge, this should be easy to revert. If no issues arise, it should be fine to make use of more involved C++20 features later on. ACKs for top commit: fanquake: ACK fa6e50d Tree-SHA512: 244d79bfb0b750a4bdd713f40573b9ca33816fb84b6c84a58f027b9d7d4bb0cc4f18642959e4cf3d094808a69e5b8a327ca8521d7c0c08af27dacb5da3e78e71
WalkthroughThe macro in Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (1)**⚙️ CodeRabbit Configuration File
Files:
🧠 Learnings (2)📓 Common learningsbuild-aux/m4/ax_cxx_compile_stdcxx.m4 (1)Learnt from: CR 🔇 Additional comments (1)
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
✅ Backport Verification SuccessfulNo issues found! This backport is complete and faithful to the original Bitcoin change. Original Bitcoin commit: ✅ Analysis DetailsChanges Verified ✅
Expected Differences ✅
CI Status ✅All CI checks passing (0 failures out of 28 total checks) This PR successfully implements the C++20 compiler requirement and associated code modernizations. All Bitcoin changes that are applicable to Dash have been correctly implemented. ✅ |
Verification Result: Logical Conflict DetectedThis PR has a logical conflict with bitcoin#30228 which was already backported to Dash. AnalysisBitcoin PR bitcoin#28349 introduced a temporary workaround to allow GCC-10:
Bitcoin PR bitcoin#30228 later reverted this workaround:
Dash Backport History
Current State
RecommendationThis PR should be closed as the changes it attempts to make:
The backport of bitcoin#28349 is effectively complete - the only change that wasn't applied is the bit-field initialization in |
|
Closing: This PR is superseded by bitcoin#30228 which was already backported in dashpay#6380. |
Backports bitcoin#28349
Original commit: 3e69125
Backported from Bitcoin Core v0.27
This PR updates Dash Core to require a C++20 compiler, following Bitcoin Core's transition. The changes include:
Note: Most of the C++20 changes were already present in Dash Core. This PR completes the transition by updating the remaining build system file.
Summary by CodeRabbit