aboutsummaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c')
-rw-r--r--gcc/c/ChangeLog5
-rw-r--r--gcc/c/c-parser.c17
2 files changed, 13 insertions, 9 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog
index 5577518..7d6250e 100644
--- a/gcc/c/ChangeLog
+++ b/gcc/c/ChangeLog
@@ -1,3 +1,8 @@
+2016-01-26 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/69483
+ * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
+
2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
PR c/24293
diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c
index efac47b..eede3a7 100644
--- a/gcc/c/c-parser.c
+++ b/gcc/c/c-parser.c
@@ -1431,15 +1431,14 @@ c_parser_translation_unit (c_parser *parser)
while (c_parser_next_token_is_not (parser, CPP_EOF));
}
- for (unsigned i = 0; i < incomplete_record_decls.length (); ++i)
- {
- tree decl = incomplete_record_decls[i];
- if (DECL_SIZE (decl) == NULL_TREE && TREE_TYPE (decl) != error_mark_node)
- {
- error ("storage size of %q+D isn%'t known", decl);
- TREE_TYPE (decl) = error_mark_node;
- }
- }
+ unsigned int i;
+ tree decl;
+ FOR_EACH_VEC_ELT (incomplete_record_decls, i, decl)
+ if (DECL_SIZE (decl) == NULL_TREE && TREE_TYPE (decl) != error_mark_node)
+ {
+ error ("storage size of %q+D isn%'t known", decl);
+ TREE_TYPE (decl) = error_mark_node;
+ }
}
/* Parse an external declaration (C90 6.7, C99 6.9).