[hackers] [scc] Fix type in constant and var nodes || Roberto E. Vargas Caballero
commit a0cfc89f2d6edb0f059c14000adab63913efce29
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Thu Sep 3 17:53:23 2015 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Thu Sep 3 17:53:23 2015 +0200
Fix type in constant and var nodes
The type of these nodes depende of the symbol passed as parameter,
but the code was not updating the type, so it is needed copy the
type from the symbol to the node.
diff --git a/cc1/code.c b/cc1/code.c
index ef836cd..50eb838 100644
--- a/cc1/code.c
+++ b/cc1/code.c
_AT_@ -411,6 +411,7 @@ varnode(Symbol *sym)
Node *np;
np = node(OSYM, sym->type, NULL, NULL);
+ np->type = sym->type;
np->lvalue = 1;
np->constant = 0;
np->symbol = 1;
_AT_@ -424,6 +425,7 @@ constnode(Symbol *sym)
Node *np;
np = node(OSYM, sym->type, NULL, NULL);
+ np->type = sym->type;
np->symbol = 1;
np->constant = 1;
np->sym = sym;
Received on Thu Sep 03 2015 - 18:00:47 CEST
This archive was generated by hypermail 2.3.0
: Thu Sep 03 2015 - 18:12:10 CEST