[hackers] [scc] Mark as defined local variables || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Sat, 9 Jan 2016 21:33:37 +0100 (CET)

commit cbdbbf1076c80ffe2281b687d6539905c485c49b
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Sat Jan 9 21:30:08 2016 +0100
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Sat Jan 9 21:30:08 2016 +0100

    Mark as defined local variables
    
    Declaration of local variables also means definition.

diff --git a/cc1/decl.c b/cc1/decl.c
index 2923838..5fe0c6a 100644
--- a/cc1/decl.c
+++ b/cc1/decl.c
_AT_@ -726,6 +726,8 @@ identifier(struct decl *dcl)
                 emit(ODECL, sym);
         if (accept('='))
                 initializer(sym, sym->type, -1);
+ if (!(sym->flags & (ISGLOBAL|ISEXTERN)) && tp->op != FTN)
+ sym->flags |= ISDEFINED;
         return sym;
 }
 
Received on Sat Jan 09 2016 - 21:33:37 CET

This archive was generated by hypermail 2.3.0 : Sat Jan 09 2016 - 21:36:27 CET