Only allow direct CVarArg usage in c_va_start

This commit is contained in:
misomosi
2026-06-30 14:18:43 -04:00
parent e276ce552b
commit c7cd4b9e95
3 changed files with 11 additions and 0 deletions

View File

@@ -765,8 +765,10 @@ gb_internal bool check_builtin_c_procedure(CheckerContext *c, Operand *operand,
return false;
}
c->allow_c_vararg_param = true;
Operand args = {};
check_expr(c, &args, ce->args[1]);
c->allow_c_vararg_param = false;
if (list.mode == Addressing_Invalid) {
return false;
}