scc

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

commit adeca5a4f37c9dde9cd0fcd5f5bbc026c23db82f
parent a5becc37677b6c86a026ce0ef9819e821d2d046a
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Fri, 14 Aug 2015 07:32:47 +0200

Fix regression of commit e6e455c

The test for the string was not to avoid crashes, was to avoid
print something in the case of OCOLON, which is only a way to get
three children in a binary tree.

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

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