Fix: Walk the expression of computed goto statements, too.
authorChristoph Mallon <christoph.mallon@gmx.de>
Wed, 28 Mar 2012 12:45:43 +0000 (14:45 +0200)
committerChristoph Mallon <christoph.mallon@gmx.de>
Thu, 29 Mar 2012 13:01:11 +0000 (15:01 +0200)
walk.c

diff --git a/walk.c b/walk.c
index 3cbfc73..00cab1f 100644 (file)
--- a/walk.c
+++ b/walk.c
@@ -359,11 +359,15 @@ static void walk_statement(statement_t *const stmt, const walk_env_t *const env)
                walk_statement(stmt->ms_try.final_statement, env);
                return;
 
+       case STATEMENT_GOTO:
+               if (stmt->gotos.expression)
+                       walk_expression(stmt->gotos.expression, env);
+               return;
+
        case STATEMENT_ERROR:
        case STATEMENT_EMPTY:
        case STATEMENT_CONTINUE:
        case STATEMENT_BREAK:
-       case STATEMENT_GOTO:
        case STATEMENT_ASM:
        case STATEMENT_LEAVE:
                return;