[hackers] [scc] Do not recover in "incorrect preprocessor directive" || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Sun, 24 Jan 2016 16:19:19 +0100 (CET)

commit 67b76eed613de026a4b40fe5ff06aee8834500ed
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Sun Jan 24 08:35:41 2016 +0100
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Sun Jan 24 08:35:41 2016 +0100

    Do not recover in "incorrect preprocessor directive"

diff --git a/cc1/cpp.c b/cc1/cpp.c
index 4885f13..2eca5f1 100644
--- a/cc1/cpp.c
+++ b/cc1/cpp.c
_AT_@ -713,8 +713,10 @@ cpp(void)
 
         for (bp = clauses; bp->token && bp->token != yytoken; ++bp)
                 /* nothing */;
- if (!bp->token)
- error("incorrect preprocessor directive");
+ if (!bp->token) {
+ errorp("incorrect preprocessor directive");
+ goto error;
+ }
 
         pushctx(); /* create a new context to avoid polish */
         (*bp->fun)(); /* the current context, and to get all */
_AT_@ -723,6 +725,7 @@ cpp(void)
         if (yytoken != EOFTOK && !cppoff)
                 errorp("trailing characters after preprocessor directive");
 
+error:
         disexpand = 0;
         lexmode = CCMODE;
         namespace = ns;
Received on Sun Jan 24 2016 - 16:19:19 CET

This archive was generated by hypermail 2.3.0 : Sun Jan 24 2016 - 16:24:23 CET