scc

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

commit 5fb1525449fa2103cadc946ff467dec95a3da638
parent a2edadd2f36ac7cd89027252bdc63f459112ec1a
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Fri, 14 Aug 2015 17:23:56 +0200

Avoid print type letters in emitbin()

If there is no letter for the operator it means that is a non
sense to print the type of the node.

Diffstat:
Mcc1/code.c | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/cc1/code.c b/cc1/code.c @@ -307,9 +307,10 @@ emitbin(unsigned op, void *arg) emitnode(np->left); emitnode(np->right); - if ((s = optxt[op]) != NULL) /* do not print in OCOLON case */ + if ((s = optxt[op]) != NULL) { /* do not print in OCOLON case */ printf("\t%s", optxt[op]); - emitletter(np->type); + emitletter(np->type); + } } static void