diff --git a/tools/qfcc/include/def.h b/tools/qfcc/include/def.h index 46c8deb73..cc53d5502 100644 --- a/tools/qfcc/include/def.h +++ b/tools/qfcc/include/def.h @@ -44,6 +44,7 @@ typedef struct def_s { struct def_s *alias; struct reloc_s *relocs; ///< for relocations + struct expr_s *initializer; ///< initialer expression unsigned offset_reloc:1; ///< use *_def_ofs relocs unsigned initialized:1; diff --git a/tools/qfcc/source/def.c b/tools/qfcc/source/def.c index 4a5087fba..d9e6f1c75 100644 --- a/tools/qfcc/source/def.c +++ b/tools/qfcc/source/def.c @@ -527,4 +527,5 @@ initialize_def (symbol_t *sym, type_t *type, expr_t *init, defspace_t *space, sym->s.def->nosave = 1; } } + sym->s.def->initializer = init; }