diff options
Diffstat (limited to 'gcc/java')
-rw-r--r-- | gcc/java/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/java/class.c | 12 | ||||
-rw-r--r-- | gcc/java/expr.c | 2 | ||||
-rw-r--r-- | gcc/java/jcf-parse.c | 6 | ||||
-rw-r--r-- | gcc/java/resource.c | 2 |
5 files changed, 17 insertions, 12 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index d0da14b3b69..d45aa33c7b3 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,10 @@ +2010-08-20 Nathan Froyd <froydnj@codesourcery.com> + + * class.c: Use FOR_EACH_VEC_ELT. + * expr.c: Likewise. + * jcf-parse.c: Likewise. + * resource.c: Likewise. + 2010-08-16 Joseph Myers <joseph@codesourcery.com> * lang.opt (MD_, MMD_, version): Mark RejectDriver. diff --git a/gcc/java/class.c b/gcc/java/class.c index 6ce8b85662e..ece261b8dd3 100644 --- a/gcc/java/class.c +++ b/gcc/java/class.c @@ -1544,9 +1544,7 @@ make_method_value (tree mdecl) e = VEC_index (constructor_elt, v, idx--); e->value = null_pointer_node; - for (ix = 0; - VEC_iterate (tree, DECL_FUNCTION_THROWS (mdecl), ix, t); - ix++) + FOR_EACH_VEC_ELT (tree, DECL_FUNCTION_THROWS (mdecl), ix, t) { tree sig = DECL_NAME (TYPE_NAME (t)); tree utf8 @@ -2762,7 +2760,7 @@ emit_indirect_register_classes (tree *list_p) VAR_DECL, get_identifier ("_Jv_CLS"), class_array_type); tree reg_class_list; - for (i = 0; VEC_iterate (tree, registered_class, i, klass); ++i) + FOR_EACH_VEC_ELT (tree, registered_class, i, klass) { t = fold_convert (ptr_type_node, build_static_class_ref (klass)); CONSTRUCTOR_APPEND_ELT (init, NULL_TREE, t); @@ -2834,7 +2832,7 @@ emit_register_classes (tree *list_p) #endif assemble_align (POINTER_SIZE); - for (i = 0; VEC_iterate (tree, registered_class, i, klass); ++i) + FOR_EACH_VEC_ELT (tree, registered_class, i, klass) { t = build_fold_addr_expr (klass); output_constant (t, POINTER_SIZE / BITS_PER_UNIT, POINTER_SIZE); @@ -2852,7 +2850,7 @@ emit_register_classes (tree *list_p) DECL_EXTERNAL (t) = 1; register_class_fn = t; - for (i = 0; VEC_iterate (tree, registered_class, i, klass); ++i) + FOR_EACH_VEC_ELT (tree, registered_class, i, klass) { t = build_fold_addr_expr (klass); t = build_call_expr (register_class_fn, 1, t); @@ -2928,7 +2926,7 @@ emit_symbol_table (tree name, tree the_table, return the_table; /* Build a list of _Jv_MethodSymbols for each entry in otable_methods. */ - for (index = 0; VEC_iterate (method_entry, decl_table, index, e); index++) + FOR_EACH_VEC_ELT (method_entry, decl_table, index, e) CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, build_symbol_entry (e->method, e->special)); diff --git a/gcc/java/expr.c b/gcc/java/expr.c index 3c987c5fe82..9f9667fa88a 100644 --- a/gcc/java/expr.c +++ b/gcc/java/expr.c @@ -2296,7 +2296,7 @@ get_symbol_table_index (tree t, tree special, method_entry *e; unsigned i; - for (i = 0; VEC_iterate (method_entry, *symbol_table, i, e); i++) + FOR_EACH_VEC_ELT (method_entry, *symbol_table, i, e) if (t == e->method && special == e->special) goto done; diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c index c27d4b553d8..cb486ae111e 100644 --- a/gcc/java/jcf-parse.c +++ b/gcc/java/jcf-parse.c @@ -1683,7 +1683,7 @@ predefined_filename_p (tree node) unsigned ix; tree f; - for (ix = 0; VEC_iterate (tree, predefined_filenames, ix, f); ix++) + FOR_EACH_VEC_ELT (tree, predefined_filenames, ix, f) if (f == node) return 1; @@ -1869,7 +1869,7 @@ java_parse_file (int set_yydebug ATTRIBUTE_UNUSED) } current_jcf = main_jcf; - for (ix = 0; VEC_iterate (tree, current_file_list, ix, node); ix++) + FOR_EACH_VEC_ELT (tree, current_file_list, ix, node) { unsigned char magic_string[4]; char *real_path; @@ -1956,7 +1956,7 @@ java_parse_file (int set_yydebug ATTRIBUTE_UNUSED) } } - for (ix = 0; VEC_iterate (tree, current_file_list, ix, node); ix++) + FOR_EACH_VEC_ELT (tree, current_file_list, ix, node) { input_location = DECL_SOURCE_LOCATION (node); if (CLASS_FILE_P (node)) diff --git a/gcc/java/resource.c b/gcc/java/resource.c index d96d2d8d362..f954024fde1 100644 --- a/gcc/java/resource.c +++ b/gcc/java/resource.c @@ -107,7 +107,7 @@ write_resource_constructor (tree *list_p) register_resource_fn = t; /* Write out entries in the same order in which they were defined. */ - for (ix = 0; VEC_iterate (tree, resources, ix, decl); ix++) + FOR_EACH_VEC_ELT (tree, resources, ix, decl) { t = build_fold_addr_expr (decl); t = build_call_expr (register_resource_fn, 1, t); |