Repository navigation
Build and test CETLVaSt with GCC 7, and run GCC 7 in CI (#136, #149) - #239
Merged
Merged
Conversation
Re-spell the trait as copy-list-initialization of a by-value function
parameter; GCC 7 rejects std::array<To, 1>{{{from}}} for scalar To.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- span: compare the iterator distance to Extent as size_type explicitly in
the CDE_span_002 debug assert. This is the conversion the comparison
already did implicitly; GCC 7 flags it with -Wsign-conversion.
- VLA exception-safety test: spell the initializer list's type out.
GCC 7 deduces `const auto list = {...}` as
std::initializer_list<const Value> (GCC PR c++/63149, fixed in GCC 8),
which no VariableLengthArray constructor takes.
- pmr::function test: clear functions with `= nullptr` instead of `= {}`,
which GCC 7 reports under -Wzero-as-null-pointer-constant.
- CI: add gcc7-native / cpp-14 to the arm64 verification matrix.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
thirtytwobits
force-pushed
the
claude/interesting-jennings-30aa49
branch
from
October 17, 2026 20:25
d1a0905 to
f7a6e97
Compare
MAMONTBOT
approved these changes
Oct 17, 2026
MAMONTBOT
left a comment
There was a problem hiding this comment.
Reviewed the changes; no blocking issues found.
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.
Makes the full CETLVaSt suite build and pass with GCC 7 (7.5.0), and adds GCC 7 to CI. The Arduino ecosystem is still on GCC 7, so this is a step toward embedded/Arduino support. Refs #149, refs #136.
Changes
Library
type_traits_ext.hpp(is_convertible_without_narrowing static assert is failing in some cases with GCC v7.3.1 #136):is_convertible_without_narrowingis now spelled as copy-list-initialization of a by-value function parameter. GCC 7 rejects the oldstd::array<To, 1>{{{from}}}for scalarTo. GCC 7 doesn't diagnose narrowing in constructor arguments during list-initialization of a class type, so for that case it now behaves likestd::variant. The trait docs andtest_type_traits_ext.cppdescribe this. This commit (0ad3b87) is the fix that was sitting uncommitted on theissue/136working tree. If is_convertible_without_narrowing static assert is failing in some cases with GCC v7.3.1 #136 lands separately, drop it.pf20/span.hpp: theCDE_span_002debug assert now casts the iterator distance tosize_typeexplicitly before comparing it withExtent. The comparison already did this conversion implicitly, so behaviour is the same on every compiler. GCC 7 flags the implicit version with-Wsign-conversion(Debug builds only).Tests only
test_variable_length_array_exception_safety.cpp: GCC 7 deducesconst auto list = {Value{...}, ...}asstd::initializer_list<const Value>(GCC PR c++/63149, fixed in GCC 8), so no constructor matched.VariableLengthArrayitself is correct. The fix is to spell outstd::initializer_list<Value>, both in the constructor test and in the initializer-list assignment test that Complete VLA range and initializer-list assignment #238 added.pmr/test_pmr_function.cpp: clear functions with= nullptrinstead of= {}. Both resolve tooperator=(std::nullptr_t), but GCC 7 reports the{}form under-Wzero-as-null-pointer-constant.CI
.github/workflows/cetlvast.yml: adds agcc7-native/cpp-14entry to the arm64 verification matrix throughinclude:, so GCC 7 isn't combined with cpp-17/20. It uploads the same artifacts as the other entries. Thegcc7-nativepresets only exist for cpp-14.Verification
Rebased onto main after #238 and re-verified:
cmake --workflow --preset workflow-gcc7-native-cpp-14-offlinepasses end to end inghcr.io/opencyphal/toolshed:ts24.4.3(aarch64) from a clean build dir. All 5 steps pass, includingrun_unittestsandrun_examplesin Release, ReleaseEP, Debug and DebugEP: 216 passing suite runs.workflow-gcc-native-cpp-14-offline(Homebrew GCC 13.4, macOS) passes end to end, also 216 passing suite runs. Clang and the other standards are left to CI.clang-format-diffwith clang-format 19.1.7).🤖 Generated with Claude Code