Repository navigation
CI: fix CI-mingw failures - #707
Merged
Merged
Conversation
- disable new clang 23 lifetime-safety suggestion warnings - remove MINGW32 since MSYS2 is phasing out 32-bit environments and mingw-w64-i686-python-pytest is no longer available
dmcppcheck
reviewed
Oct 26, 2026
dmcppcheck
left a comment
There was a problem hiding this comment.
AI review
I found no problems in this PR. It only changes CI and CMake.
- CMake: the three
-Wno-lifetime-safety-*flags are added throughadd_compile_options_safe. On a clang that doesn't know them,check_cxx_compiler_flagfails, so the flags are skipped and the build is unaffected. They are also added inside theClangbranch, so the MINGW64 + clang++ job gets them too. - Workflow: removing MINGW32 also removes its
includeandexcludeentries, and no other part of the workflow still refers to MINGW32 or i686.
The description already says that CI will have no 32-bit build after this. I couldn't check with clang 23 because it isn't in the container.
Testing
make -j8 testrunner simplecpp CXXOPTS=-Werrorinpr/: built with no errors../testrunnerexit code 0.python3 run-tests.py: 0 failed, 21 skipped.python3 -m pytest integration_test.py: 128 passed../selfcheck.shexit code 0.- CMake path with an older clang:
CXX=clang++ cmake -S . -B build -DCMAKE_COMPILE_WARNING_AS_ERROR=Onwith clang 18.1.3 and cmake 3.28.3. All threeHAS_CXX_FLAG_Wno_lifetime_safety_*checks reportFailed, so the flags are not added. Thesimplecppandtestrunnertargets build with warnings-as-errors andtestrunnerpasses. - Not tested: clang 23, where the flags should be accepted and the warnings turned off, and the MSYS2 workflow itself. Neither is available offline.
- I didn't write preprocessor test inputs because the PR doesn't change any preprocessing code.
Automated review of 5cc78a0 by Claude. The pull request was built and tested locally.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CI-mingw is failing on master (e.g. https://github.com/cppcheck-opensource/simplecpp/actions/runs/40300479372) for two unrelated reasons:
CLANG64 (clang++): MSYS2 now ships clang 23.1.3, and
-Weverythingenables new lifetime-safety suggestion warnings (-Wlifetime-safety-intra-tu-suggestions,-Wlifetime-safety-intra-tu-constructor-suggestions,-Wlifetime-safety-cross-tu-constructor-suggestions), which fail the build withCMAKE_COMPILE_WARNING_AS_ERROR. These are disabled viaadd_compile_options_safe, so older compilers are unaffected. A TODO is left to consider adding[[clang::lifetimebound]]annotations instead.MINGW32 (g++):
mingw-w64-i686-python-pytestis no longer available, and setup-msys2 warns that MINGW32 is deprecated with no replacement. MINGW32 is removed from the matrix. Note: this leaves no 32-bit build in CI.