mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
Change #c_vararg checking to only disallow odin calling conventions
This commit is contained in:
+6
-2
@@ -2031,10 +2031,14 @@ bool check_procedure_type(CheckerContext *ctx, Type *type, Ast *proc_type_node,
|
|||||||
if (param_count > 0) {
|
if (param_count > 0) {
|
||||||
Entity *end = params->Tuple.variables[param_count-1];
|
Entity *end = params->Tuple.variables[param_count-1];
|
||||||
if (end->flags&EntityFlag_CVarArg) {
|
if (end->flags&EntityFlag_CVarArg) {
|
||||||
if (cc == ProcCC_StdCall || cc == ProcCC_CDecl) {
|
switch (cc) {
|
||||||
|
default:
|
||||||
type->Proc.c_vararg = true;
|
type->Proc.c_vararg = true;
|
||||||
} else {
|
break;
|
||||||
|
case ProcCC_Odin:
|
||||||
|
case ProcCC_Contextless:
|
||||||
error(end->token, "Calling convention does not support #c_vararg");
|
error(end->token, "Calling convention does not support #c_vararg");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user