shithub: scc

Download patch

ref: f6ee7ffbe56651728f55cd3eb2dac8552f657580
parent: 79653a933b3cfb9dafed904d6c4831d3c77c3e9c
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Tue Jun 14 12:02:58 EDT 2016

[cc2-qbe] Do not append ':' to block labels

Qbe does not require ':' at the end of labels, and in
fact, it is an error.

--- a/cc2/arch/qbe/code.c
+++ b/cc2/arch/qbe/code.c
@@ -345,7 +345,7 @@
 	/* emit assembler instructions */
 	for (pc = prog; pc; pc = pc->next) {
 		if (pc->label)
-			printf("%s:\n", symname(pc->label));
+			printf("%s\n", symname(pc->label));
 		if (pc->op)
 			(*optbl[pc->op].fun)();
 	}