Without this patch evaluate_iterator() evaluates
stmt->iterator_pre_condition twice.

Code:
        static void f(void)
        {
                for ( ; x; );
        }

output:

        tst.c:3:10: warning: undefined identifier 'x'
        tst.c:3:10: warning: undefined identifier 'x'

Signed-off-by: Oleg Nesterov <[EMAIL PROTECTED]>

--- git-snapshot-20050814/parse.c~2_forpost     2005-08-15 00:27:27.000000000 
+0400
+++ git-snapshot-20050814/parse.c       2005-08-15 00:58:48.000000000 +0400
@@ -1200,7 +1200,7 @@ static struct token *parse_for_statement
        stmt->iterator_pre_statement = make_statement(e1);
        stmt->iterator_pre_condition = e2;
        stmt->iterator_post_statement = make_statement(e3);
-       stmt->iterator_post_condition = e2;
+       stmt->iterator_post_condition = NULL;
        stmt->iterator_statement = iterator;
        end_iterator(stmt);
 
@@ -1217,7 +1217,7 @@ static struct token *parse_while_stateme
        token = statement(token, &iterator);
 
        stmt->iterator_pre_condition = expr;
-       stmt->iterator_post_condition = expr;
+       stmt->iterator_post_condition = NULL;
        stmt->iterator_statement = iterator;
        end_iterator(stmt);
-
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to