commit 78517784dbcc4232bdd71df3365437b6174ab717
Author:     Roberto E. Vargas Caballero <[email protected]>
AuthorDate: Fri Sep 18 12:34:34 2015 +0200
Commit:     Roberto E. Vargas Caballero <[email protected]>
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
@@ -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

Reply via email to