scc

Simple C99 Compiler
Log | Files | Refs | README | LICENSE

commit 4d3bd7972a348bbadd872312a68a0b2570a8bd02
parent b8e51de07999a695f7e66bcfa1b270e61896dd5d
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Tue,  6 Oct 2015 09:21:43 +0200

Fix output of string in only cpp mode

The quotation marks were omitted.

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

diff --git a/cc1/cpp.c b/cc1/cpp.c @@ -741,7 +741,7 @@ outcpp(void) printf("%s ", yytext); continue; } - for (s = yylval.sym->u.s; c = *s; ++s) { + for (s = yytext; c = *s; ++s) { switch (c) { case '\n': t = "\\n"; @@ -770,6 +770,7 @@ outcpp(void) break; } } + putchar(' '); } putchar('\n'); }