Skip to content

emit-C: the compiler's own C is refused at emission: "C backend does not support enum variants with 2 payload fields" (emit-c-test red on main 0f0d76ba) #2017

Closed

Description

@ehartford

Found running :emit-c-test (not in the battery) while verifying #2014's emit-c stub change.

Repro on main 0f0d76b (fresh worktree, pinned seed):

WITH=$PWD/src/main src/main build :compiler-version-sources
out/release/bin/with build $PWD/out/gen/versioned_main.w --emit-c --bundle-corpus std/re -o /tmp/main.c
error: C emission failed: C backend does not support enum variants with 2 payload fields

(the release binary here was built from branch fix-2014, whose C backend is main's; main's tree reproduces it.)

Expected: the emit-C lane emits the compiler's C (#955/#1043 track what fails after emission). Actual: emission refuses loudly at a multi-field enum payload, which da08b14 (#1964) made a TypeLayout-aligned shape. The refusal is correct per No Silent Fallbacks; the C backend needs the shape. emit-c-test, emit-c-fixpoint, emit-c-roundtrip and bootstrap-c-emit-sources all stop here.

Activity

  1. added
    bug
    on Oct 3, 2026
  2. ehartford commented on Oct 3, 2026

    @ehartford
    ContributorAuthor

    Fixed on main in 74e3001 (stack #2032; seed-driven battery GREEN on 2b9ad28, tree identical to main).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions