mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-23 20:33:05 +00:00
Expression has undefined behavior (left operand modifies code->globals->used, used by right operand): (code->globals)[(((vector_t*)((void *)code->globals)) - 1)->used++] = (code_genstring(code, global->constval.vstring)) Code has unspecified behavior. Order of evaluation of function parameters or subexpressions is not defined, so if a value is used and modified in different places not separated by a sequence point constraining evaluation order, then the result of the expression is unspecified.
This commit is contained in:
parent
35120caf80
commit
dc6a7436ee
1 changed files with 2 additions and 1 deletions
3
ir.c
3
ir.c
|
@ -3418,7 +3418,8 @@ static bool ir_builder_gen_global(code_t *code, ir_builder *self, ir_value *glob
|
|||
{
|
||||
ir_value_code_setaddr(global, vec_size(code->globals));
|
||||
if (global->hasvalue) {
|
||||
vec_push(code->globals, code_genstring(code, global->constval.vstring));
|
||||
uint32_t load = code_genstring(code, global->constval.vstring);
|
||||
vec_push(code->globals, load);
|
||||
} else {
|
||||
vec_push(code->globals, 0);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue