mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-31 21:20:33 +00:00
Make initialized globals non-constant
This is for modern code. Traditional code still treats initialized globals as constant and nosave. This will make a bit of a mess of modern code that expects traditional behavior.
This commit is contained in:
parent
b7b6a89b91
commit
d9c9686288
1 changed files with 5 additions and 2 deletions
|
@ -578,10 +578,13 @@ initialize_def (symbol_t *sym, expr_t *init, defspace_t *space,
|
||||||
type_size (sym->type) * sizeof (pr_type_t));
|
type_size (sym->type) * sizeof (pr_type_t));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sym->s.def->initialized = sym->s.def->constant = 1;
|
sym->s.def->initialized = 1;
|
||||||
|
if (options.traditional) {
|
||||||
|
sym->s.def->constant = 1;
|
||||||
sym->s.def->nosave = 1;
|
sym->s.def->nosave = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
sym->s.def->initializer = init;
|
sym->s.def->initializer = init;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue