shithub: scc

Download patch

ref: 9b4c6ff2e6afee8e2a97f96f21ab894c859e867e
parent: 10a0b46b7b6016099d6aa422e09c2179fe7b2fcc
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Sat May 9 14:15:56 EDT 2015

Fix error returning EOFTOK in next()

--- a/cc1/lex.c
+++ b/cc1/lex.c
@@ -479,7 +479,7 @@
 	char c;
 
 	if (!fill())
-		return EOFTOK;
+		return yytoken = EOFTOK;
 
 	while (isspace(*input->begin))
 		++input->begin;
--- a/cc1/stmt.c
+++ b/cc1/stmt.c
@@ -313,6 +313,7 @@
 compound(Symbol *lbreak, Symbol *lcont, Caselist *lswitch)
 {
 	extern jmp_buf recover;
+
 	pushctx();
 	expect('{');