[hackers] [scc] Avoid emit castings to void || Roberto E. Vargas Caballero
commit 78517784dbcc4232bdd71df3365437b6174ab717
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Fri Sep 18 12:34:34 2015 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Fri Sep 18 12:34:34 2015 +0200
Avoid emit castings to void
These castings are only important to semantic level, so it is a non
sense to emit them to the backend.
diff --git a/cc1/code.c b/cc1/code.c
index d0728fb..913b964 100644
--- a/cc1/code.c
+++ b/cc1/code.c
_AT_@ -318,7 +318,8 @@ emitcast(unsigned op, void *arg)
Node *np = arg, *lp = np->left;
emitnode(lp);
- printf("\t%c%c", lp->type->letter, np->type->letter);
+ if (np->type != voidtype)
+ printf("\t%c%c", lp->type->letter, np->type->letter);
}
static void
Received on Fri Sep 18 2015 - 15:04:57 CEST
This archive was generated by hypermail 2.3.0
: Fri Sep 18 2015 - 15:12:14 CEST