scc

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

commit a0d198a1bfef04690021893794afc3e22de38946
parent 04b94d81004857b6f21a15622001bb8c8996d9c5
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Mon, 16 Jan 2017 16:34:18 +0100

[cc1] Add more comments about macro expansion and EOF

Diffstat:
Mcc1/lex.c | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/cc1/lex.c b/cc1/lex.c @@ -128,7 +128,7 @@ delinput(void) --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 @@ repeat: 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; }