diff options
| author | Quentin Carbonneaux <[email protected]> | 2017-02-07 23:03:38 -0500 |
|---|---|---|
| committer | Quentin Carbonneaux <[email protected]> | 2017-02-10 11:06:00 -0500 |
| commit | b698584443f17b8d0cfd88e0afe037ce351e0ee6 (patch) | |
| tree | b19f6a9db3231e2a0251559e888f46122c6e0ff6 /minic | |
| parent | d9f1121763c126316ab338ca8b1b9d51967a33b1 (diff) | |
update minic for new vararg support
We conservatively assume all functions have
variable argument lists.
Diffstat (limited to 'minic')
| -rw-r--r-- | minic/minic.y | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/minic/minic.y b/minic/minic.y index 6b4150d..eeef900 100644 --- a/minic/minic.y +++ b/minic/minic.y @@ -290,18 +290,12 @@ call(Node *n, Symb *sr) fprintf(of, "\t"); psymb(*sr); fprintf(of, " =%c call $%s(", irtyp(sr->ctyp), f); - a = n->r; - if (a) - for (;;) { - fprintf(of, "%c ", irtyp(a->u.s.ctyp)); - psymb(a->u.s); - a = a->r; - if (a) - fprintf(of, ", "); - else - break; - } - fprintf(of, ")\n"); + for (a=n->r; a; a=a->r) { + fprintf(of, "%c ", irtyp(a->u.s.ctyp)); + psymb(a->u.s); + fprintf(of, ", "); + } + fprintf(of, "...)\n"); } Symb |
