fix(specs): crm-duet declared two functions twice and the C backend emitted both - #4558
Merged
Merged
Conversation
…mitted both Fixes #4557 `state_after` and `retry_allowed` were each declared twice in specs/automation/crm-duet.t27, byte-identical down to the comment. `t27c check` had been saying so all along -- "every backend rejects a redeclaration" -- and it was right. What it did not do was stop anything: the warning is not an error, `gen-c` exits 0, and the emitted header carries both definitions. cc -std=c11 -fsyntax-only before -> error: redefinition of 'state_after' cc -std=c11 -fsyntax-only after -> that error is gone t27c check before -> 0 errors, 2 warnings t27c check after -> 0 errors, 0 warnings tools/dupe_scan.py after -> no new duplicate, no known group grew The deletion keeps the pair that sits with the module's other function declarations. The spec's 12 tests are unchanged and still resolve. This is master's red, not either open PR's: #4541 and #4551 both fail `duplicate-bodies` on this file, which neither of them touches.
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
Contributor
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.
Fixes #4557
state_afterandretry_allowedwere each declared twice inspecs/automation/crm-duet.t27, byte-identical down to the comment.t27c checkhad been saying so all along — every backend rejects a redeclaration — and it was right. What it did not do was stop anything: the warning is not an error,gen-cexits 0, and the emitted header carries both definitions.cc -std=c11 -fsyntax-onlyerror: redefinition of 'state_after't27c checktools/dupe_scan.pyThe deletion keeps the pair that sits with the module's other function declarations. The spec's 12 tests are unchanged and still resolve.
This is master's red, not a PR's. #4541 and #4551 both fail
duplicate-bodieson this file, which neither of them touches — the gate runs onpull_request, so a defect that lands on master surfaces only on the next unrelated PR. Merging this clears that check on both.Two things found next to it and deliberately left alone, now in #4557's Границы:
gen-cexiting 0 on a spec it knows every backend rejects, and the emitted guard#ifndef AUTOMATION::CRM_DUET_H, which is not a valid macro name.