diff options
author | Michael Forney <mforney@mforney.org> | 2019-02-19 17:49:43 -0800 |
---|---|---|
committer | Michael Forney <mforney@mforney.org> | 2019-02-19 17:49:43 -0800 |
commit | f326044f9fc4ef7e182603e8686dde3f12da42dd (patch) | |
tree | 501aa8008e0f3bbdbcdb207d75aba6d0eba9f9f5 /expr.c | |
parent | 5e668f124cdaccb38cf2a879ccf456c971743136 (diff) |
Implement __builtin_va_copy
Diffstat (limited to 'expr.c')
-rw-r--r-- | expr.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -453,6 +453,13 @@ postfixexpr(struct scope *s, struct expression *r) expect(TCOMMA, "after va_list"); e->type = typename(s); expect(TRPAREN, "after typename"); + } else if (r->ident.decl == &builtinvacopy) { + e = mkexpr(EXPRASSIGN, typevalist.base, 0); + e->assign.l = mkunaryexpr(TMUL, exprconvert(assignexpr(s), &typevalistptr)); + expect(TCOMMA, "after target va_list"); + e->assign.r = mkunaryexpr(TMUL, exprconvert(assignexpr(s), &typevalistptr)); + expect(TRPAREN, "after source va_list"); + e = exprconvert(e, &typevoid); } else if (r->ident.decl == &builtinvaend) { e = mkexpr(EXPRBUILTIN, &typevoid, 0); e->builtin.kind = BUILTINVAEND; |