scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit dfd6b350e13d9915b819b92c890052d7474188c5
parent d7ab9b5afef9e41134bab4f6fc5448204702c2ee
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sat, 23 Jan 2016 05:46:04 +0100

Fix small problems in code.c

These problems were caused due to a bad synchronyzation
with other parts of the code, mainly cc.h

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

diff --git a/cc1/code.c b/cc1/code.c @@ -290,7 +290,7 @@ emitstring(Symbol *sym, Type *tp) while (isprint(*bp) && bp < lim) ++bp; if ((n = bp - s) > 1) - printf("\t#%c%.*s\n", L_NAME, n, s); + printf("\t#\"%.*s\n", n, s); else bp = s; if (bp == lim) @@ -377,8 +377,7 @@ emitdcl(unsigned op, void *arg) putchar('\t'); emitletter(sym->type); printf("\t\"%s", (sym->name) ? sym->name : ""); - if (op != OFUN) - putchar('\n'); + putchar('\n'); sym->flags |= ISEMITTED; } @@ -422,7 +421,7 @@ emitfun(unsigned op, void *arg) Symbol *sym = arg, **sp; emitdcl(op, arg); - puts("\n{"); + puts("{"); for (sp = sym->u.pars; sp && *sp; ++sp) emit(ODECL, *sp);