diff options
author | Michael Forney <mforney@mforney.org> | 2019-04-25 13:03:42 -0700 |
---|---|---|
committer | Michael Forney <mforney@mforney.org> | 2019-04-25 13:04:35 -0700 |
commit | 992873f1a51847bd7e80e172e1a46c95c559177d (patch) | |
tree | 3739caa176126112a4078ded784a3e1a1e13f323 | |
parent | a71a7975c95b794983c4b83a26981c7b4d7f7c82 (diff) | |
download | cproc-992873f1a51847bd7e80e172e1a46c95c559177d.tar.xz |
qbe: Error out when va_arg is called with non-scalar type
-rw-r--r-- | qbe.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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: |