diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-06-21 17:49:05 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-06-21 17:49:05 +0100 |
| commit | 264ca00db72f56e2af8242a90e35a49b6ae13f86 (patch) | |
| tree | c7a1f170fea7c22b4d3734282716b0ee0e74ad7c /src/check_expr.cpp | |
| parent | 6b65ef6d8847ea7dcb23a556e12daae69738c5c2 (diff) | |
| parent | 5957d7f7bee7e5fac4035d47ecaaaad022adbfb8 (diff) | |
Merge branch 'master' of https://github.com/gingerBill/Odin
Diffstat (limited to 'src/check_expr.cpp')
| -rw-r--r-- | src/check_expr.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 05096bf52..df16ab2b4 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -1419,7 +1419,9 @@ bool abi_compat_return_by_value(gbAllocator a, ProcCallingConvention cc, Type *a if (abi_return_type == NULL) { return false; } - if (cc == ProcCC_Odin) { + switch (cc) { + case ProcCC_Odin: + case ProcCC_Contextless: return false; } @@ -1465,6 +1467,8 @@ void check_procedure_type(Checker *c, Type *type, AstNode *proc_type_node) { if (end->flags&EntityFlag_CVarArg) { if (pt->calling_convention == ProcCC_Odin) { error(end->token, "Odin calling convention does not support #c_vararg"); + } else if (pt->calling_convention == ProcCC_Contextless) { + error(end->token, "Odin's contextless calling convention does not support #c_vararg"); } else if (pt->calling_convention == ProcCC_Fast) { error(end->token, "Fast calling convention does not support #c_vararg"); } else { |