finally fix the tupe corruption.

This commit is contained in:
Bill Currie 2001-06-19 16:01:38 +00:00
parent bdc0ba32ca
commit 2647e63810
3 changed files with 7 additions and 11 deletions

View file

@ -134,10 +134,12 @@ PR_NewDef (type_t *type, const char *name, def_t *scope)
def = calloc (1, sizeof (def_t));
#if 1
if (name) {
pr.def_tail->next = def;
pr.def_tail = def;
}
#endif
if (scope) {
def->scope_next = scope->scope_next;

View file

@ -782,15 +782,7 @@ PR_FindType (type_t *type)
def_t *def;
type_t *check;
int i;
extern int lineno;
printf("%-5d ", lineno);
PR_PrintType (type);
puts("");
for (check = pr.types; check; check = check->next) {
PR_PrintType (check);
puts("");
}
puts("");
for (check = pr.types; check; check = check->next) {
if (check->type != type->type
|| check->aux_type != type->aux_type

View file

@ -126,9 +126,11 @@ def_item
def_t scope;
scope.scope_next=$<def>4;
PR_FlushScope (&scope);
$$ = $7;
}
| '(' ')' { current_type = parse_params (0); } def_name opt_definition {}
| '(' ELIPSIS ')' { current_type = parse_params ((def_t*)1); } def_name opt_definition {}
| '(' ')' { current_type = parse_params (0); } def_name opt_definition { $$ = $4; }
| '(' ELIPSIS ')' { current_type = parse_params ((def_t*)1); } def_name opt_definition { $$ = $5; }
;
def_name