From 74f7482d568378516f2139f764a50ae759bec840 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Mon, 15 Sep 2008 09:15:06 +0000 Subject: [PATCH 1/1] Parse the unlikely case, that someone writes "variable * ..." at the beginning of a expression statement, correctly. [r21961] --- parser.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/parser.c b/parser.c index a4a016a..7b21630 100644 --- a/parser.c +++ b/parser.c @@ -9480,13 +9480,18 @@ static statement_t *intern_parse_statement(void) } else if (is_typedef_symbol(token.v.symbol)) { statement = parse_declaration_statement(); } else switch (la1_type) { + case '*': + if (get_declaration(token.v.symbol, NAMESPACE_NORMAL) != NULL) + goto expression_statment; + /* FALLTHROUGH */ + DECLARATION_START case T_IDENTIFIER: - case '*': statement = parse_declaration_statement(); break; default: +expression_statment: statement = parse_expression_statement(); break; } -- 2.20.1