Skip to content

transform_match: null statement after label for C17 portability#94

Merged
dylanbstorey merged 2 commits into
mainfrom
fix-c17-label-portability
Jun 4, 2026
Merged

transform_match: null statement after label for C17 portability#94
dylanbstorey merged 2 commits into
mainfrom
fix-c17-label-portability

Conversation

@dylanbstorey

Copy link
Copy Markdown
Contributor

Problem

The v0.6.0 release build failed on the macos-14 runner with:

src/backend/transform/transform_match.c:2016: error: expected expression
... use of undeclared identifier 'deferred_tgt_label_cond'

skip_target_node_join: is a label immediately followed by a declaration (char deferred_tgt_label_cond[512]). In C17 and earlier a label may only precede a statement, not a declaration. Apple clang on macos-14 (default ~C17) rejects it; gcc and newer clang (C23 default) accept it as an extension — which is why PR CI (full-build-unix macos-latest) and local builds passed but the release runner did not.

No partial release occurred: the build failure skipped build-wheels, publish-python, publish-rust, and create-release — nothing was published to PyPI, crates.io, or GitHub releases.

Fix

Add a null statement (;) after the label. Verified:

  • clang -std=c17 -fsyntax-only passes on all backend .c files (scanned every goto label; this was the only label-before-declaration).
  • Extension builds; runtime behavior unchanged.

Why not switch the release runner to macos-latest?

That would mask non-conformant C that other strict toolchains would also reject, and swap a pinned runner for a moving target in arch-specific release artifacts. Fixing the code is the portable fix.

After merge: re-tag v0.6.0 to re-run the release.

`skip_target_node_join:` was immediately followed by a declaration
(`char deferred_tgt_label_cond[512]`). A label may not precede a
declaration in C17 and earlier, so Apple clang on the macos-14 release
runner rejected it (`error: expected expression`) and the v0.6.0 release
build failed (publish steps skipped — nothing was published). gcc and
newer clang accept it as an extension, so PR CI and local builds passed.
Add a null statement after the label. Verified: all backend .c files pass
`clang -std=c17 -fsyntax-only`; extension builds; unaffected at runtime.
@dylanbstorey dylanbstorey added the skip-coverage-matrix Bypass the semantic coverage matrix check (reserved for refactors / suite-covered changes) label Jun 4, 2026
@dylanbstorey dylanbstorey merged commit 0aae7eb into main Jun 4, 2026
16 of 17 checks passed
@dylanbstorey dylanbstorey deleted the fix-c17-label-portability branch June 4, 2026 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-coverage-matrix Bypass the semantic coverage matrix check (reserved for refactors / suite-covered changes)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant