scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

commit c94328210580bb413ba01f7db622470e41676693
parent b1b5c5787733eefb5d185743b368a4eef483aae9
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sat, 30 Oct 2021 16:57:07 +0200

cc2/qbe: Do nothing for conversions to void

Conversions to void case was not considered and it was aborting,
when the only thing to do is just doing nothing.

Diffstat:
Msrc/cmd/cc/cc2/target/qbe/cgen.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/cmd/cc/cc2/target/qbe/cgen.c b/src/cmd/cc/cc2/target/qbe/cgen.c @@ -266,6 +266,8 @@ copy(Type *tp, Node *to, Node *from) int op; switch (tp->size) { + case 0: + return from; case 1: op = ASCOPYB; break;