Correct off-by-one error in source position of empty statements.
authorChristoph Mallon <christoph.mallon@gmx.de>
Sun, 31 Aug 2008 21:23:55 +0000 (21:23 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Sun, 31 Aug 2008 21:23:55 +0000 (21:23 +0000)
[r21598]

parser.c

index 89d48f4..0fdf5e6 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -8987,8 +8987,9 @@ static statement_t *parse_empty_statement(void)
        if (warning.empty_statement) {
                warningf(HERE, "statement is empty");
        }
+       statement_t *const statement = create_empty_statement();
        eat(';');
-       return create_empty_statement();
+       return statement;
 }
 
 /**