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
Define migrator behavior for variadic function definitions #174
The C migrator supports variadic extern declarations and variadic call sites, as demonstrated by the std.libc surface for functions such as fprintf and printf. The unresolved design question is how to handle C functions that define a variadic body, for example helper functions that use va_list/va_start/va_arg/va_end internally.
Today this is easy to mishandle by emitting a stub or placeholder for the unsupported definition, which violates the migrator policy: generated output must either be semantically correct or fail loudly with a diagnostic and non-zero exit. We should decide whether the migrator should translate variadic definitions correctly, or detect them and fail loudly with source location and function name.
Scope notes:
Variadic externs are not the problem.
Variadic calls are not the problem.
The question is specifically C variadic function definitions in migrated output.
Until implemented, silently generating Never, comptime_error, panic, return 0, or any placeholder body is not acceptable.
Closed by 025a397 on main.\n\nRoot cause: ci_migrate_translate_function treated variadic C function definitions as ordinary functions after only using the variadic bit for signature printing, so va_list/va_start/va_arg bodies were lowered into bogus With and reported success.\n\nFix: variadic C function definitions now fail loudly and non-zero with the function name and source location unless they are a deliberately implemented special case. Variadic declarations remain supported.\n\nRegression: c-migrator-basic now verifies the failing exit status, diagnostic text/location, and that no .w output is produced.\n\nVerified: make build, make fixpoint, make test, make install-user.
Activity
ehartford commentedon May 29, 2026
Closed by 025a397 on main.\n\nRoot cause: ci_migrate_translate_function treated variadic C function definitions as ordinary functions after only using the variadic bit for signature printing, so va_list/va_start/va_arg bodies were lowered into bogus With and reported success.\n\nFix: variadic C function definitions now fail loudly and non-zero with the function name and source location unless they are a deliberately implemented special case. Variadic declarations remain supported.\n\nRegression: c-migrator-basic now verifies the failing exit status, diagnostic text/location, and that no .w output is produced.\n\nVerified: make build, make fixpoint, make test, make install-user.