cproc

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/cproc
Log | Files | Refs | Submodules | README | LICENSE

commit 992873f1a51847bd7e80e172e1a46c95c559177d
parent a71a7975c95b794983c4b83a26981c7b4d7f7c82
Author: Michael Forney <mforney@mforney.org>
Date:   Thu, 25 Apr 2019 13:03:42 -0700

qbe: Error out when va_arg is called with non-scalar type

Diffstat:
Mqbe.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/qbe.c b/qbe.c @@ -883,6 +883,9 @@ funcexpr(struct func *f, struct expr *e) funcinst(f, IVASTART, NULL, l); break; case BUILTINVAARG: + /* https://todo.sr.ht/~mcf/cc-issues/52 */ + if (!(e->type->prop & PROPSCALAR)) + error(&tok.loc, "va_arg with non-scalar type is not yet supported"); l = funcexpr(f, e->base); return funcinst(f, IVAARG, e->type->repr, l); case BUILTINVAEND: