From c8f1b5b1f0743821d3d7cfc4fc4c027603c19a62 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sun, 27 Feb 2011 00:37:35 +0900 Subject: [PATCH] Fix the missing type encoding for structures. There should be a better way (probably by doing the encoding as needed rather than in chain_type), but this seems to work for now. --- tools/qfcc/source/struct.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/qfcc/source/struct.c b/tools/qfcc/source/struct.c index 5eb5f13ed..2b1e9064f 100644 --- a/tools/qfcc/source/struct.c +++ b/tools/qfcc/source/struct.c @@ -56,6 +56,7 @@ static __attribute__ ((used)) const char rcsid[] = #include "emit.h" #include "expr.h" #include "immediate.h" +#include "obj_type.h" #include "qfcc.h" #include "reloc.h" #include "strpool.h" @@ -132,6 +133,8 @@ build_struct (int su, symbol_t *tag, symtab_t *symtab, type_t *type) if (!type) sym->type = find_type (sym->type); // checks the tag, not the symtab sym->type->t.symtab = symtab; + if (!type && sym->type->type_def->external) //FIXME should not be necessary + sym->type->type_def = qfo_encode_type (sym->type); return sym; }