Create a declaration, when accessing a non-existent compound entry, so the AST contai...
authorChristoph Mallon <christoph.mallon@gmx.de>
Fri, 12 Sep 2008 19:11:29 +0000 (19:11 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Fri, 12 Sep 2008 19:11:29 +0000 (19:11 +0000)
[r21905]

parser.c

index c8049e1..b3e9892 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -6772,7 +6772,8 @@ static expression_t *parse_select_expression(unsigned precedence,
        declaration_t *iter = find_compound_entry(declaration, symbol);
        if (iter == NULL) {
                errorf(HERE, "'%T' has no member named '%Y'", orig_type, symbol);
-               return create_invalid_expression();
+               iter         = allocate_declaration_zero();
+               iter->symbol = symbol;
        }
 
        /* we always do the auto-type conversions; the & and sizeof parser contains