[qfcc] Set builtin function def flags

This fixes the missing redefinition error when a builtin is defined
twice (and thus corrupting the function chain).
This commit is contained in:
Bill Currie 2020-03-05 11:48:15 +09:00
parent 9ccfe8aefc
commit 1459361cbd

View file

@ -650,6 +650,9 @@ build_builtin_function (symbol_t *sym, expr_t *bi_val, int far)
if (sym->s.func->def->external)
return 0;
sym->s.func->def->initialized = 1;
sym->s.func->def->constant = 1;
sym->s.func->def->nosave = 1;
add_function (sym->s.func);
if (is_integer_val (bi_val))