From 0583dc82d374267d12a997d788c108661b1f9992 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Wed, 21 Nov 2012 10:26:41 +0900 Subject: [PATCH] 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) --- tools/qfcc/source/flow.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tools/qfcc/source/flow.c b/tools/qfcc/source/flow.c index 46e70d30d..58a148ba0 100644 --- a/tools/qfcc/source/flow.c +++ b/tools/qfcc/source/flow.c @@ -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);