[hackers] [scc] [cc2] Do not allocate data for functions || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Wed, 27 Jan 2016 16:59:15 +0100 (CET)

commit a1815ba111ef7531c60c1a2e4eaeb9351e0ba791
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Tue Jan 26 22:13:39 2016 +0100
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Tue Jan 26 22:19:09 2016 +0100

    [cc2] Do not allocate data for functions
    
    Function definitions are GLOBAL or private, but they don't
    implie a space allocation.

diff --git a/cc2/parser.c b/cc2/parser.c
index 0a0db2b..8f2ae2e 100644
--- a/cc2/parser.c
+++ b/cc2/parser.c
_AT_@ -377,7 +377,7 @@ decl(Symbol *sym)
         case PRIVAT:
         case LOCAL:
                 label(sym);
- if (!ininit)
+ if (!ininit && (sym->type.flags & FUNF) == 0)
                         allocdata(&sym->type);
                 break;
         case AUTO:
Received on Wed Jan 27 2016 - 16:59:15 CET

This archive was generated by hypermail 2.3.0 : Wed Jan 27 2016 - 17:00:42 CET