mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-23 02:41:30 +00:00
Treat uninitialized temps as a bug.
It really should be impossible, but I'm not sure where the bug is yet (though there are uninitialized variables that are false positives that most definitely are initialized, might be related)
This commit is contained in:
parent
2aaa380098
commit
0583dc82d3
1 changed files with 8 additions and 5 deletions
|
@ -528,11 +528,14 @@ flow_uninitialized (flowgraph_t *graph)
|
|||
flowvar_t *var = func->vars[var_iter->member];
|
||||
def_t *def;
|
||||
|
||||
def = flowvar_get_def (var);
|
||||
dummy.line = def->line;
|
||||
dummy.file = def->file;
|
||||
warning (&dummy, "%s may be used uninitialized", def->name);
|
||||
puts (operand_string (var->op));
|
||||
if (var->op->op_type == op_temp) {
|
||||
bug (0, "uninitialized temporary: %s", operand_string (var->op));
|
||||
} else {
|
||||
def = flowvar_get_def (var);
|
||||
dummy.line = def->line;
|
||||
dummy.file = def->file;
|
||||
warning (&dummy, "%s may be used uninitialized", def->name);
|
||||
}
|
||||
}
|
||||
set_delete (stuse);
|
||||
set_delete (stdef);
|
||||
|
|
Loading…
Reference in a new issue