diff options
| author | 2026-04-13 19:25:11 +0200 | |
|---|---|---|
| committer | 2026-04-13 19:30:01 +0200 | |
| commit | ddbd42e66cc71b470730037d76f4f267e98d8d40 (patch) | |
| tree | aae9ff541b3e0690e23e391bb2e5e8927d34bf38 /src/c_builtin.c | |
| parent | 36143af2748b6fcae02ca320baaac417d77ebe58 (diff) | |
C99 complex types MVP
Missing: static eval of complex values,
Silly inefficient implementation of equality comparisons between them
The whole thing is pretty inefficient without proper aggregate mem2reg
anyway
Diffstat (limited to 'src/c_builtin.c')
| -rw-r--r-- | src/c_builtin.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/c_builtin.c b/src/c_builtin.c index 522c4dc..79bdcc7 100644 --- a/src/c_builtin.c +++ b/src/c_builtin.c @@ -147,7 +147,7 @@ Ref builtin_va_arg_comp(Function *fn, const Expr *ex, bool discard) { assert(ex->t == EVAARG && ex->ty.t); - enum irclass k = isagg(ex->ty) ? KPTR : type2cls[scalartypet(ex->ty)]; + enum irclass k = (isagg(ex->ty) || iscomplex(ex->ty)) ? KPTR : type2cls[scalartypet(ex->ty)]; return addinstr(fn, mkinstr2(Ovaarg, k, compileexpr(fn, ex->sub, 0), mktyperef(mkirtype(ex->ty)))); } |