[hackers] [scc] Emit name of variables in declarations || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Thu, 13 Aug 2015 20:02:11 +0200 (CEST)

commit 0b8f18a02b36d3cb05b703f9dac7953924942a49
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Thu Aug 13 09:53:55 2015 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Thu Aug 13 09:53:55 2015 +0200

    Emit name of variables in declarations
    
    This name is needed for global variables and in the case
    of locals can be useful for debugging

diff --git a/cc1/code.c b/cc1/code.c
index b8ef034..7f821a1 100644
--- a/cc1/code.c
+++ b/cc1/code.c
_AT_@ -266,6 +266,8 @@ emitdcl(unsigned op, void *arg)
         emitvar(sym);
         putchar('\t');
         emitletter(sym->type);
+ if (sym->name)
+ printf("\t%s", sym->name);
         if (op != OFUN)
                 putchar('\n');
         sym->flags |= ISEMITTED;
Received on Thu Aug 13 2015 - 20:02:11 CEST

This archive was generated by hypermail 2.3.0 : Thu Aug 13 2015 - 20:12:13 CEST