Repository navigation
RDKB-66207: [CI] gcc diff-gate: gcc-14 error classes, PR-introduced findings only, -Os recompile, unreachable-code lane - #1536
Merged
mateuszCieslak-GL merged 5 commits intoOct 21, 2026
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The GCC parser silently discards equals-suffixed diagnostic tags used by newly enabled warning classes.
1 open issue
What changed in this PR
Prepares CI diagnostics for GCC 14 and production-level optimization, and adds advisory unreachable-code reporting.
Changes:
- Expands GCC warning coverage and recompiles at
-Oswithout existing-Werrorpromotions. - Reports unreachable code in summaries and annotations, excluding inline comments.
- Narrows CI lint triggers and updates tests and documentation.
| File | Description |
|---|---|
| ci-README.md | Documents updated diagnostic behavior. |
| .github/workflows/makefile.yml | Expands GCC diagnostics and adds unreachable-code reporting. |
| .github/workflows/ci-lint.yml | Narrows triggers and clarifies pinning guarantees. |
| .github/scripts/tidy_to_inline.py | Excludes unreachable-code findings from inline comments. |
| .github/scripts/tests/test_tidy_to_inline.py | Tests unreachable-code exclusion. |
| .github/scripts/tests/test_gcc_diff_gate.py | Tests recompile command flags. |
| .github/scripts/gcc_diff_gate.py | Adds optimization and warning-flag handling. |
| .github/.yamllint | Explicitly disables empty-value checks. |
| .clang-tidy | Updates comments describing diagnostic coverage. |
Review effort: Balanced
GATE gains the gcc-14 error-by-default classes gcc-13 can warn on, plus sizeof-pointer-memaccess and format-security; warnings gain the measured- quiet set. The recompile uses -Os, strips the DB's -Werror= promotions and drops C-only flags on C++ files. ENFORCE stays false.
Arms clang-diagnostic-unreachable-code* (-Wunreachable-code-aggressive) as the dead-code proxy. Its findings get their own warnings block, never inline (reachability depends on the build configuration), and are dropped for a file that did not parse with its own flags.
The detector matches only the paths each lane inspects plus its config. .yamllint states empty-values: disable explicitly, and the ci-lint header no longer claims the runner cannot drift under the pinned linters.
gcc tags a warning that takes a level as [-Warray-bounds=] or [-Wdangling-pointer=]; the tag regexes rejected those, so the findings were dropped. Classify them under the bare flag name; test rows added.
Compile each changed file's base version too and drop a changed-line finding the file already had (same class and message), so editing an old undeclared call is not an error. Reword the gcc-14 rationale.
mateuszCieslak-GL
force-pushed
the
ci/diff-gate-lists
branch
from
October 21, 2026 16:18
e88764f to
f18d971
Compare
Contributor
🔨 Build summaryCommit Banana Pi R4 - MLO — build success
|
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.

Reason for change.
ENFORCEis on) gain the fourdiagnostics gcc-14 turns into errors by default (
-Wint-conversion,-Wimplicit-function-declaration,-Wimplicit-int,-Wincompatible-pointer-types): wrong callABI and int/pointer confusion.
build/linux/makefile.commonsilences three of them, which hides abacklog (431 implicit declarations, 14 incompatible pointer types on the bpi build); the gate
keeps new code from adding to it. Plus
-Wsizeof-pointer-memaccessand-Wformat-security. Thewarning list gains classes measured quiet over the tree (
-Wunused-*,-Waddress,-Wstringop-*,-Warray-bounds,-Wdangling-pointer,-Wuse-after-free). (gcc-14's other twodefault errors have no gcc-13 flag;
-Wreturn-typecovers return mismatches, which are whatactually breaks this build on gcc-14: 5 sites.)
drops a changed-line finding the file already had (matched by class and message, not line), so a
PR that edits a line calling an old undeclared function gets no ❌. The summary states how many
were dropped (the job log lists them); they are never posted inline. A file the PR adds, or
whose base version gcc cannot finish compiling (the summary names it), is judged on changed
lines as before.
-Os, like the production build. The compile DB is-O0, which leaves theoptimizer-dependent warnings silent. The recompile also removes the DB's own
-Werror=<class>flags (a bare
-Wno-errordoes not undo them) so no class can abort it, and drops C-only flags onC++ files.
clang-diagnostic-unreachable-code*is armed as a dead-codecheck. Its findings get their own ❗ block in the summary and annotations, never an inline comment
(whether code is reachable can depend on the build configuration), and are dropped for a file that
did not parse with its own flags.
inspects;
.yamllintstatesempty-values: disableexplicitly; the ci-lint header no longeroverstates what the pins guarantee.
ci-README.mdsections 3c and 3d and the gcc-14 / gcc-15 note updated;.clang-tidyheader updated.Unchanged on purpose: gate findings are still posted inline (❌) and listed in the CI summary, and
ENFORCEstaysfalse.Verification
a VLA, an unused variable and unreachable code, to a built file and to a file outside the compile
DB. New clang-tidy: one unreachable-code finding on the built file only, no inline candidate, the
annotation present. New gcc gate: ❌
-Wvlaand ❗-Wunused-variable, both as inline candidates,and no recompile failure. The previous clang-tidy step reports none of the unreachable code.
-Werror=flags are gone,
-Osis added (the entry has no-O), and each candidate is demoted..c(each commitagainst its first parent, bpi compile DB, the lists above). Changed lines only: 7 commits would
get a ❌. Counting only what the PR introduced: 4 commits, 9 findings, each a function newly
called in that file without a prototype (incl. a misspelled
wifi_hal_parse_rm_beaon_report).The rest were edits of lines the file already had findings for (old undeclared calls, a
callback type mismatch already present). A PR that renames a struct member in a header while
editing an old undeclared call (the base then compiles with errors) still gets only its new
finding: checked with real gcc in a throwaway repo.
[-Warray-bounds=]): the real gcc step over a throwaway commit dropsthe finding before this change and reports it (❗, summary and inline) after.
.github/release.ymlor a.pyoutside.githubno longer start a lane; workflows, actions,
.yamllint, scripts,ruff.toml(incl. renamed away)still do; a truncated list lints everything.
compileall clean;
python3 -m unittest discover -s .github/scripts/tests: 21 OK. CI Lint andBuild Check green on the PR head.