shithub: scc

Download patch

ref: 90f5f7af21e783b19821e3ecd27d2175ca50fdd7
parent: e441794261a07daf191f12cee98e71423029ef50
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Mon Jan 16 11:34:18 EST 2017

[cc1] Add more comments about macro expansion and EOF

--- a/cc1/lex.c
+++ b/cc1/lex.c
@@ -128,7 +128,7 @@
 		--hide->hide;
 		/*
 		 * If the symbol is not declared then it was
-		 * an extension due to a #if directive with
+		 * an expansion due to a #if directive with
 		 * a non declared symbol (expanded to 0),
 		 * thus we have to kill the symbol
 		 */
@@ -648,6 +648,11 @@
 		return;
 
 	if (lexmode == CPPMODE) {
+		/*
+		 * If we are in cpp mode, we only return eof when
+		 * we don't have more inputs, or when the next
+		 * next input is from a file
+		 */
 		if (!input || !input->next || !input->next->fp)
 			return;
 	}