Parse the unlikely case, that someone writes "variable * ..." at the beginning of...
authorChristoph Mallon <christoph.mallon@gmx.de>
Mon, 15 Sep 2008 09:15:06 +0000 (09:15 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Mon, 15 Sep 2008 09:15:06 +0000 (09:15 +0000)
[r21961]

parser.c

index a4a016a..7b21630 100644 (file)
--- 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;
                }