shithub: scc

Download patch

ref: 7c1c6de3c313bcc6d9b460735e37961426c28783
parent: 30281a311c063851cb9b85c72eaff8f3d0473f6a
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Tue May 10 06:40:35 EDT 2016

[cc2-qbe] Add comma operator

The most difficult operator.

--- a/cc2/arch/qbe/cgen.c
+++ b/cc2/arch/qbe/cgen.c
@@ -351,9 +351,10 @@
 		}
 		code(op, np->left, load(np, LOADR), NULL);
 		return np->right;
+	case OCOMMA:
+		return np->right;
 	case OCALL:
 	case OFIELD:
-	case OCOMMA:
 	case OASK:
 	case OCOLON:
 	case OAND: