[hackers] [scc] Discard input in #error || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Sat, 18 Jul 2015 10:27:46 +0200 (CEST)

commit fed5b85cc2ccff56e815e8d964f4fb80f694c5d0
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Sat Jul 18 09:52:27 2015 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
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
_AT_@ -438,7 +438,8 @@ usererr(void)
         if (cppoff)
                 return;
         printerr("#error %s", input->p);
- /* TODO: discard input */
+ *input->p = '\0';
+ next();
 }
 
 static void
Received on Sat Jul 18 2015 - 10:27:46 CEST

This archive was generated by hypermail 2.3.0 : Sat Jul 18 2015 - 10:36:15 CEST