summary refs log tree commit diff
path: root/minic
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2017-02-07 23:03:38 -0500
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2017-02-10 11:06:00 -0500
commitb698584443f17b8d0cfd88e0afe037ce351e0ee6 (patch)
treeb19f6a9db3231e2a0251559e888f46122c6e0ff6 /minic
parentd9f1121763c126316ab338ca8b1b9d51967a33b1 (diff)
downloadroux-b698584443f17b8d0cfd88e0afe037ce351e0ee6.tar.gz
update minic for new vararg support
We conservatively assume all functions have
variable argument lists.
Diffstat (limited to 'minic')
-rw-r--r--minic/minic.y18
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