From 265a244ba243718f3b3d6f91c81eefa92cced3c5 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Mon, 7 Feb 2011 15:30:49 +0900 Subject: [PATCH] Set the symbol type for structs etc as soon as the tag is created. Tags (struct/union/enum) are always types. --- tools/qfcc/source/struct.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/qfcc/source/struct.c b/tools/qfcc/source/struct.c index c202af075..a0a91930c 100644 --- a/tools/qfcc/source/struct.c +++ b/tools/qfcc/source/struct.c @@ -90,6 +90,7 @@ find_tag (ty_type_e ty, symbol_t *tag, type_t *type) sym->type = type; sym->type->type = ev_invalid; sym->type->ty = ty; + sym->sy_type = sy_type; return sym; } @@ -128,7 +129,6 @@ build_struct (int su, symbol_t *tag, symtab_t *symtab, type_t *type) symtab->size = size; } } - sym->sy_type = sy_type; sym->type->t.symtab = symtab; sym->type = find_type (sym->type); return sym;