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
{{ message }}
Repository navigation
Sema accepts extern "C" fn() -> [T; N]: a C function pointer cannot return an array #1975
Found by the #1817 work (wave-cimport, 0511025). The native backend accepts let f: extern "C" fn() -> [u16; 2] = arr and emit-c refuses it loudly, because no C function type can return an array (C11 6.7.6.3p1). A type the C ABI cannot express must not exist: Sema should reject an extern "C" fn type whose return (or parameter) is an array, naming the fix (return a struct wrapping the array, or take an out-pointer). Failing-first: a compile_errors fixture with that binding; today it checks ok.
Fixed on main in c884c1c (stack #2001 → #2010, seed-driven battery GREEN on b932ef6, tree identical to main). Fixture coverage is in the stack's commits.
Activity
Sema: no array in a C function's signature, type or declaration (#1975)
Sema: one arity check for every call path (#1973); owned ?? / unwrap_…
ehartford commentedon Oct 3, 2026
Fixed on main in c884c1c (stack #2001 → #2010, seed-driven battery GREEN on b932ef6, tree identical to main). Fixture coverage is in the stack's commits.