diff options
author | Teddy <[email protected]> | 2014-04-07 05:52:04 +0800 |
---|---|---|
committer | Teddy <[email protected]> | 2014-04-07 05:52:04 +0800 |
commit | 1021d4e462da1089b50bcc023efdc0134d12fcac (patch) | |
tree | b45720175f8bf2b09df435dd8de8c9244cd1b79c /semantics.c | |
parent | 8ab5aab4ee0e27092dc588e196b1437614687964 (diff) |
...
Diffstat (limited to 'semantics.c')
-rw-r--r-- | semantics.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/semantics.c b/semantics.c index 39ca0c1..2a3cfeb 100644 --- a/semantics.c +++ b/semantics.c @@ -579,7 +579,7 @@ CTable_t semantics_fields(CNode *p, CScope_t scope) { CVar_t semantics_decl(CNode *p, CScope_t scope) { CHECK_TYPE(p, DECL); - CNode *init = p->chd->next; + CNode *declr = p->chd->next; CType_t type = semantics_type_spec(p->chd, scope); CVar_t res = NULL; int useful = 0; @@ -589,10 +589,10 @@ CVar_t semantics_decl(CNode *p, CScope_t scope) { cscope_push_type(scope, type); useful = 1; } - if (init->chd->type != NOP) + if (declr->chd->type != NOP) { CNode *p; - for (p = init->chd; p; p = p->next) + for (p = declr->chd; p; p = p->next) { /* TODO: initializer checking */ CVar_t var = semantics_declr(p->chd, type, scope, 0); |