From 76ebc662b0acb3571f519f150fce9eeba3f619f6 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Sat, 7 Mar 2009 20:40:28 +0000 Subject: [PATCH] fix __extension__ in for statement [r25615] --- parser.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/parser.c b/parser.c index a7f4d80..94da9e4 100644 --- a/parser.c +++ b/parser.c @@ -9790,6 +9790,12 @@ static statement_t *parse_for(void) size_t const top = environment_top(); scope_t *old_scope = scope_push(&statement->fors.scope); + bool old_gcc_extension; + while (token.type == T___extension__) { + next_token(); + in_gcc_extension = true; + } + if (token.type == ';') { next_token(); } else if (is_declaration_specifier(&token, false)) { @@ -9806,6 +9812,7 @@ static statement_t *parse_for(void) rem_anchor_token(';'); expect(';', end_error2); } + in_gcc_extension = old_gcc_extension; if (token.type != ';') { add_anchor_token(';'); -- 2.20.1