shithub: scc

Download patch

ref: ccb1f9e706a93e7b05512cb2e89a9fc45b92641c
parent: b5f5fb997e89d3189022f62f51b5cc4fbf6d9bbb
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Mon Apr 18 13:26:02 EDT 2016

[cc2-qbe] Support void functions in qbe

Qbe functions are indicated omitting the type in the function
declaration. In our case a void type can be discovered seeing
that the size is 0.

--- a/cc2/arch/qbe/code.c
+++ b/cc2/arch/qbe/code.c
@@ -139,6 +139,8 @@
 		return "b";
 	} else {
 		switch (tp->size) {
+		case 0:
+			return "";
 		case 1:
 			return "b";
 		case 2: