Skip to content

Add GCC 15 warning support#825

Merged
laurynas-biveinis merged 1 commit into
masterfrom
gcc-15-partial
Dec 4, 2025
Merged

Add GCC 15 warning support#825
laurynas-biveinis merged 1 commit into
masterfrom
gcc-15-partial

Conversation

@laurynas-biveinis
Copy link
Copy Markdown
Collaborator

@laurynas-biveinis laurynas-biveinis commented Dec 3, 2025

Tweak old-compilers.yml at the same time.

Summary by CodeRabbit

  • Chores
    • Updated build system to support flexible GCC version configuration.
    • Extended compiler support to GCC 15.0+ with improved warning detection.

✏️ Tip: You can customize this high-level summary in your review settings.

Tweak old-compilers.yml at the same time.
@laurynas-biveinis laurynas-biveinis self-assigned this Dec 3, 2025
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Dec 3, 2025

Walkthrough

This PR adds GCC 15 compiler support to the build system and parameterizes the GitHub Actions workflow for flexible compiler installation. Changes include new warning flags for C++15+, compiler version checks, and a parameterized installation step.

Changes

Cohort / File(s) Summary
GitHub Actions workflow parameterization
.github/workflows/old-compilers.yml
Replaces hardcoded g++-13 installation with g++-${VERSION} variable for flexible compiler version selection.
GCC 15+ compiler support
CMakeLists.txt
Adds GCC_GE_15_CXX_WARNING_FLAGS with whitespace-related warning flags; introduces cxx_ge_15 version check against 15.0; defines is_gxx_ge_15 conditional; integrates new flags into COMMON_TARGET_PROPERTIES via generator expression.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • CMakeLists.txt generator expressions and flag definitions should be verified for correctness
  • Confirm is_gxx_ge_15 conditional logic properly gates the warning flags for standalone builds

Possibly related PRs

Poem

🔨 From thirteen to fifteen we climb,
New warnings flag the whitespace crime,
Variables flow through workflows bright,
GCC marches on to compile the night. 🌙

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding GCC 15 warning support to CMakeLists.txt, which is the primary objective of this pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch gcc-15-partial

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0b20e68 and a748522.

📒 Files selected for processing (2)
  • .github/workflows/old-compilers.yml (1 hunks)
  • CMakeLists.txt (4 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (4)
.github/workflows/old-compilers.yml (1)

776-781: Parameterization is correct, but GCC 15 is missing from the test matrix.

Line 780 now uses g++-${VERSION} instead of hardcoded g++-13, which properly aligns with the parameterized workflow. However, the workflow matrix (lines 518–732) only defines GCC versions 10–13. To fully support GCC 15 as claimed in the PR title, you need to add GCC 15 test matrix entries.

Verify whether GCC 15 packages are available in the Ubuntu 22.04 repository or require a PPA. If available, add matrix entries following the existing GCC 13 pattern. If not available, consider either updating the runner OS or clarifying that GCC 15 support is limited to CMake configuration only.

CMakeLists.txt (3)

416-427: Version check and combined condition follow the established pattern.

Lines 416–427 correctly introduce cxx_ge_15 and is_gxx_ge_15 following the existing pattern for other GCC versions (e.g., cxx_ge_14 and is_gxx_ge_14). The generator expressions are syntactically correct and properly combine the GCC compiler ID with the version constraint.


740-740: Warning flags are correctly applied with proper conditional.

Line 740 applies GCC_GE_15_CXX_WARNING_FLAGS using the correct generator expression pattern: $<$<AND:${is_standalone},${is_gxx_ge_15}>:...>. This mirrors the existing conditional logic for other version-specific warning sets (lines 737–739).


122-123: The warning flags -Wleading-whitespace=spaces and -Wtrailing-whitespace=any are both valid in GCC 15. These flags are documented in the GCC 15 manual and were newly added in GCC 15. The implementation is correct.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Dec 3, 2025

@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.33%. Comparing base (0b20e68) to head (a748522).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #825      +/-   ##
==========================================
+ Coverage   98.16%   98.33%   +0.16%     
==========================================
  Files          35       35              
  Lines        6492     6492              
==========================================
+ Hits         6373     6384      +11     
+ Misses        119      108      -11     
Flag Coverage Δ
Debug 98.33% <ø> (+0.20%) ⬆️
Release 97.46% <ø> (-0.11%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@laurynas-biveinis laurynas-biveinis merged commit 668f21c into master Dec 4, 2025
237 of 239 checks passed
@laurynas-biveinis laurynas-biveinis deleted the gcc-15-partial branch December 4, 2025 04:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant