From 5cea0c20ee3573949a2c24e4b3dea65fcbf6e48b Mon Sep 17 00:00:00 2001 From: Quentin Carbonneaux Date: Fri, 2 Sep 2022 12:48:10 +0200 Subject: flag bad vastart uses --- parse.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'parse.c') diff --git a/parse.c b/parse.c index 583388b..85214c2 100644 --- a/parse.c +++ b/parse.c @@ -671,6 +671,8 @@ DoOp: op = Oload; if (op == Talloc1 || op == Talloc2) op = Oalloc; + if (op == Ovastart && !curf->vararg) + err("cannot use vastart in non-variadic function"); if (k >= Ksb) err("size class must be w, l, s, or d"); if (op >= NPubOp) -- cgit 1.4.1