From: Christoph Mallon Date: Mon, 15 Sep 2008 09:15:06 +0000 (+0000) Subject: Parse the unlikely case, that someone writes "variable * ..." at the beginning of... X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=74f7482d568378516f2139f764a50ae759bec840;p=cparser Parse the unlikely case, that someone writes "variable * ..." at the beginning of a expression statement, correctly. [r21961] --- 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; }