scc

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

commit fed5b85cc2ccff56e815e8d964f4fb80f694c5d0
parent 3b52a1e7d7756e0b70b79edbd47fab5b19450164
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sat, 18 Jul 2015 09:52:27 +0200

Discard input in #error

it we have to discard the rest of the input if we don't
want to have a trailing error.

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

diff --git a/cc1/cpp.c b/cc1/cpp.c @@ -438,7 +438,8 @@ usererr(void) if (cppoff) return; printerr("#error %s", input->p); - /* TODO: discard input */ + *input->p = '\0'; + next(); } static void