From e8070df1b797fac885e22924df503fc41ffb3b39 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Fri, 12 Sep 2008 19:11:29 +0000 Subject: [PATCH] Create a declaration, when accessing a non-existent compound entry, so the AST contains something sensible. [r21905] --- parser.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/parser.c b/parser.c index c8049e1..b3e9892 100644 --- 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 -- 2.20.1