Skip to content

emit-C: call arguments of pointer-to-pointer type are emitted without the cast C requires (int8_t** for char**) #2769

Closed

Description

@ehartford

Observed un-skipping emit-c-smoke on Windows (#811): the prelude_runtime emitted unit fails under clang 22 (mingw) with 5 hard errors, all in migrated mlib code:\n\n lib/std/engines/mlib/facade_shapes.w:192:23: error: incompatible pointer types passing 'int8_t **' (aka 'signed char **') to parameter of type 'char ' [-Wincompatible-pointer-types]\n\n(also :206, :219, :479, :487). POSIX host cc accepts the same emitted C with the conversion as a warning, so the macOS/Linux lanes never saw it.\n\nRoot cause to find in CCodegen: a call argument whose With type is a pointer to i8 where the callee's C parameter is char (facade/C-signatures over byte buffers) is emitted without a cast. The fix is at the emission site (cast when the argument's C type differs from the parameter's), not in the migrated corpus (re-promoted only) and not in the check.\n\nUntil then, build/selfhost.w bs_emit_c_cc_args passes -Wno-error=incompatible-pointer-types so every host judges the emitted C the same way; remove that flag with this fix.

Activity

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

    @ehartford
    ContributorAuthor

    Fixed on main in b434398 (stack #2783, #2784, #2785, #2787); each commit's message names the root cause and the evidence. The Windows battery's remaining reds are tracked separately.

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