commit fed5b85cc2ccff56e815e8d964f4fb80f694c5d0
Author:     Roberto E. Vargas Caballero <[email protected]>
AuthorDate: Sat Jul 18 09:52:27 2015 +0200
Commit:     Roberto E. Vargas Caballero <[email protected]>
CommitDate: Sat Jul 18 09:52:27 2015 +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.

diff --git a/cc1/cpp.c b/cc1/cpp.c
index 7978f13..65808f2 100644
--- 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

Reply via email to