Remove the write-only attribute bool has_flexible_member from struct compound_t.
authorChristoph Mallon <christoph.mallon@gmx.de>
Thu, 1 Jan 2009 10:16:04 +0000 (10:16 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Thu, 1 Jan 2009 10:16:04 +0000 (10:16 +0000)
[r25013]

entity_t.h
parser.c

index ac282ce..66fc0cf 100644 (file)
@@ -129,7 +129,6 @@ struct compound_t {
        scope_t           members;
        decl_modifiers_t  modifiers;
        bool              complete            : 1;
-       bool              has_flexible_member : 1;
 
        /* ast2firm info */
        ir_type          *irtype;
index b0d2f4b..3c0caf0 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -6600,11 +6600,9 @@ static void parse_compound_declarators(compound_t *compound,
                                                                entity->base.symbol, orig_type);
                                        } else if (is_type_incomplete(type)) {
                                                /* ยง6.7.2.1:16 flexible array member */
-                                               if (is_type_array(type) &&
-                                                               token.type == ';'   &&
-                                                               look_ahead(1)->type == '}') {
-                                                       compound->has_flexible_member = true;
-                                               } else {
+                                               if (!is_type_array(type)       ||
+                                                               token.type          != ';' ||
+                                                               look_ahead(1)->type != '}') {
                                                        errorf(&entity->base.source_position,
                                                                        "compound member '%Y' has incomplete type '%T'",
                                                                        entity->base.symbol, orig_type);