diff options
| author | 2022-08-29 23:01:37 +0200 | |
|---|---|---|
| committer | 2022-08-29 23:01:37 +0200 | |
| commit | 34313d801d38aa726d01b7f09690fb7a86ac47dd (patch) | |
| tree | ef891f88562c167e732dc7d7b9a8a656f92da6cd /bootstrap/parse.c | |
| parent | 2f243de6ce9402f880677a07b832c0e56a7f688d (diff) | |
remove ir*.cff; make vararg only with primitive types
Diffstat (limited to 'bootstrap/parse.c')
| -rw-r--r-- | bootstrap/parse.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bootstrap/parse.c b/bootstrap/parse.c index fd38860..b16ef13 100644 --- a/bootstrap/parse.c +++ b/bootstrap/parse.c @@ -1317,6 +1317,9 @@ pexpostfix(struct parser *P) { fatal(P, arg.span, "call argument #%d type mismatch (%t, expected %t)", i, arg.ty, ty->fn.params.d[i]); + if (i >= n && (arg.ty->t == TYstruct || arg.ty->t == TYunion || arg.ty->t == TYeunion || arg.ty->t == TYslice)) { + fatal(P, arg.span, "cannot pass aggregate value as variadic argument"); + } ++i; vec_push(&args, arg); |