You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TASK-060: broaden suppression gate + single-pass awk + unit test
Review follow-up to the initial TASK-060 commit.
scripts/check-warning-suppressions.sh
- Replace the narrow two-file WATCHED_FILES list with a runtime scan
of all .cpp files under src/. Safe because no other TU in src/
carries an unscoped -Warray-bounds pragma today, and the broad scan
means future TUs are guarded without anyone having to remember to
update a static list.
- Collapse the two per-candidate awk invocations (one for nearest
push-before, one for nearest pop-after) into a single awk pass that
emits both line numbers. Halves the work per candidate and keeps
the bracketing logic in one place.
- Document the known limitation of the "nearest push before / nearest
pop after" heuristic: an interleaved shape (push, pop, pragma, pop)
would slip through. Not present in the codebase; upgrade to a
depth counter if nested patterns ever appear.
Makefile.am
- Wire lint-warning-suppressions into check-local. Unlike the other
lint-* gates it has no external-tool dependency (bash/awk/grep
only), so it can run in every developer build and CI lane, not
just the dedicated lint lane. Updated the surrounding comment to
record that asymmetry and its rationale.
scripts/test_check_warning_suppressions.sh (new)
- Self-contained bash unit test that fixtures clean / bracketed /
unbracketed / mixed cases in a tmpdir, runs the script against
each, and asserts the expected exit code. Not wired into
`make check` (it builds throwaway src/ trees that would confuse a
parallel `make check` run); intended for direct invocation by
contributors editing the gate itself.
specs/tasks/M7-v2-cleanup/TASK-060.md / _index.md
- Mark all action items checked and flip status to Done.
specs/unworked_review_issues/2026-06-04_105130_task-060.md
- Reviewer log preserved for the audit trail; the one MAJOR finding
(single-pass awk) is addressed by this commit, the 37 MINORs are
catalogued for future passes.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: specs/tasks/M7-v2-cleanup/TASK-060.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,11 +8,11 @@
8
8
Eliminate the two unscoped `#pragma GCC diagnostic ignored "-Warray-bounds"` directives flagged as the worst-shaped suppressions in `specs/tasks/v2-branch-gap-audit.md` §1 "HIGH — Unscoped warning suppressions". Either localize each to the minimum offending line range with a `push`/`pop` pair plus a comment explaining the underlying false-positive, or investigate and remove the suppression entirely once the warning is silenced at the source.
9
9
10
10
**Action Items:**
11
-
-[] Reproduce the `-Warray-bounds` warning at `src/http_utils.cpp:62` under the supported GCC versions used in CI (matrix lanes in `.github/workflows/verify-build.yml`). Capture the exact diagnostic text and offending construct in the commit message.
12
-
-[] Reproduce the same at `src/detail/ip_representation.cpp:55`. Capture diagnostic text.
13
-
-[] For each site: either (a) rewrite the source so the warning no longer fires and delete the pragma, or (b) replace the file-scoped pragma with a tightly scoped `#pragma GCC diagnostic push` / `#pragma GCC diagnostic ignored "-Warray-bounds"` / `#pragma GCC diagnostic pop` block around the minimum offending lines, with a comment naming the GCC version range and the upstream report (if any).
14
-
-[] If the suppression is kept, add a `TODO(TASK-NNN-followup)` style comment only if a concrete follow-up exists; otherwise the scoping comment is sufficient.
15
-
-[] Add a guard test or static-analysis spot-check that fails if either file regains a file-scoped suppression.
11
+
-[x] Reproduce the `-Warray-bounds` warning at `src/http_utils.cpp:62` under the supported GCC versions used in CI (matrix lanes in `.github/workflows/verify-build.yml`). Capture the exact diagnostic text and offending construct in the commit message.
12
+
-[x] Reproduce the same at `src/detail/ip_representation.cpp:55`. Capture diagnostic text.
13
+
-[x] For each site: either (a) rewrite the source so the warning no longer fires and delete the pragma, or (b) replace the file-scoped pragma with a tightly scoped `#pragma GCC diagnostic push` / `#pragma GCC diagnostic ignored "-Warray-bounds"` / `#pragma GCC diagnostic pop` block around the minimum offending lines, with a comment naming the GCC version range and the upstream report (if any).
14
+
-[x] If the suppression is kept, add a `TODO(TASK-NNN-followup)` style comment only if a concrete follow-up exists; otherwise the scoping comment is sufficient.
15
+
-[x] Add a guard test or static-analysis spot-check that fails if either file regains a file-scoped suppression.
16
16
17
17
**Dependencies:**
18
18
- Blocked by: None
@@ -28,4 +28,4 @@ Eliminate the two unscoped `#pragma GCC diagnostic ignored "-Warray-bounds"` dir
0 commit comments