From 7418a977092a144e8a53469f29fe7a65b9df989c Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Mon, 17 Nov 2008 10:34:26 +0000 Subject: [PATCH] Compound types are incomplete until the }. [r23721] --- parser.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/parser.c b/parser.c index d4f54fb..4b61108 100644 --- a/parser.c +++ b/parser.c @@ -3006,8 +3006,6 @@ static compound_t *parse_compound_type_specifier(bool is_struct) } if (token.type == '{') { - compound->complete = true; - parse_compound_type_entries(compound); modifiers |= parse_attributes(&attributes); } @@ -6199,6 +6197,9 @@ static void parse_compound_type_entries(compound_t *compound) semantic_compound(compound); rem_anchor_token('}'); next_token(); + + /* §6.7.2.1:7 */ + compound->complete = true; } static type_t *parse_typename(void) -- 2.20.1