diff options
author | Teddy <[email protected]> | 2014-04-10 19:45:33 +0800 |
---|---|---|
committer | Teddy <[email protected]> | 2014-04-10 19:45:33 +0800 |
commit | b1263939ee71fea26a2c980829c33a2556a0d65a (patch) | |
tree | 0b3c3bfc613661f669cc3cfcb0b774465698c938 | |
parent | f314c03bdf62b83fe4d2b8d600d15d839a0c32b9 (diff) |
the tail->next should be NULL in params
-rw-r--r-- | semantics.c | 2 | ||||
-rw-r--r-- | semantics.h | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/semantics.c b/semantics.c index 6e2075c..df9bf35 100644 --- a/semantics.c +++ b/semantics.c @@ -338,7 +338,6 @@ static CType_t struct_type_merge(CType_t new, CScope_t scope) { ERROR(new->ast); } /* otherwise incomplete, thus complete the type */ - old->next = new->next; old->rec.fields = new->rec.fields; old->ast = new->ast; free(new); @@ -497,6 +496,7 @@ CVar_t semantics_params(CNode *p, CScope_t scope) { tail = var; } ctable_destory(tparams); + tail->next = NULL; return params; } diff --git a/semantics.h b/semantics.h index 8a69c13..fbbcf02 100644 --- a/semantics.h +++ b/semantics.h @@ -32,7 +32,6 @@ struct CType { CFUNC } type; const char *name; - CType_t next; union { CTable_t fields; /* for a struct or union */ CType_t ref; /* for a pointer */ |