diff options
author | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-03-03 14:07:39 +0000 |
---|---|---|
committer | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-03-03 14:07:39 +0000 |
commit | 3585dac7a9c88a562d5b231e74a121bea751ba95 (patch) | |
tree | 22fa38b6c76c86b74f079f044047e56332102862 /gcc/attribs.c | |
parent | 9b6f7c7a867d1e11dd2460454e5912fc56102d28 (diff) | |
download | ppe42-gcc-3585dac7a9c88a562d5b231e74a121bea751ba95.tar.gz ppe42-gcc-3585dac7a9c88a562d5b231e74a121bea751ba95.zip |
* attribs.c (init_attributes, decl_attributes): Use ARRAY_SIZE in
lieu of explicit sizeof/sizeof.
* i386.c (override_options, ix86_init_mmx_sse_builtins,
ix86_expand_builtin): Likewise.
* mips.c (mips_add_gc_roots): Likewise.
* mmix.c (mmix_output_condition): Likewise.
* rs6000.c (rs6000_override_options, altivec_expand_builtin,
altivec_init_builtins): Likewise.
* sparc.c (mark_ultrasparc_pipeline_state): Likewise.
* cppexp.c (Nsuff, parse_number): Likewise.
* cppinit.c (builtin_array_end): Likewise.
* gcc.c (n_default_compilers, process_command): Likewise.
* genpreds.c (output_predicate_decls): Likewise.
* ggc-page.c (NUM_EXTRA_ORDERS): Likewise.
* lcm.c (N_ENTITIES): Likewise.
* stor-layout.c (set_sizetype): Likewise.
ada:
* utils.c (init_gnat_to_gnu, init_gigi_decls): Use ARRAY_SIZE in
lieu of explicit sizeof/sizeof.
cp:
* decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
explicit sizeof/sizeof.
* decl2.c (cxx_decode_option): Likewise.
* lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
java:
* class.c (init_class_processing): Use ARRAY_SIZE in lieu of
explicit sizeof/sizeof.
* decl.c (java_init_decl_processing): Likewise.
* jcf-parse.c (init_jcf_parse): Likewise.
* parse.y (init_src_parse): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@50255 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/attribs.c')
-rw-r--r-- | gcc/attribs.c | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/gcc/attribs.c b/gcc/attribs.c index ca5a10c3dc2..c1536f699a3 100644 --- a/gcc/attribs.c +++ b/gcc/attribs.c @@ -177,7 +177,7 @@ static void init_attributes () { #ifdef ENABLE_CHECKING - int i; + size_t i; #endif attribute_tables[0] @@ -188,9 +188,7 @@ init_attributes () #ifdef ENABLE_CHECKING /* Make some sanity checks on the attribute tables. */ - for (i = 0; - i < (int) (sizeof (attribute_tables) / sizeof (attribute_tables[0])); - i++) + for (i = 0; i < ARRAY_SIZE (attribute_tables); i++) { int j; @@ -222,9 +220,7 @@ init_attributes () } /* Check that each name occurs just once in each table. */ - for (i = 0; - i < (int) (sizeof (attribute_tables) / sizeof (attribute_tables[0])); - i++) + for (i = 0; i < ARRAY_SIZE (attribute_tables); i++) { int j, k; for (j = 0; attribute_tables[i][j].name != NULL; j++) @@ -234,16 +230,11 @@ init_attributes () abort (); } /* Check that no name occurs in more than one table. */ - for (i = 0; - i < (int) (sizeof (attribute_tables) / sizeof (attribute_tables[0])); - i++) + for (i = 0; i < ARRAY_SIZE (attribute_tables); i++) { - int j, k, l; + size_t j, k, l; - for (j = i + 1; - j < ((int) (sizeof (attribute_tables) - / sizeof (attribute_tables[0]))); - j++) + for (j = i + 1; j < ARRAY_SIZE (attribute_tables); j++) for (k = 0; attribute_tables[i][k].name != NULL; k++) for (l = 0; attribute_tables[j][l].name != NULL; l++) if (!strcmp (attribute_tables[i][k].name, @@ -294,10 +285,7 @@ decl_attributes (node, attributes, flags) bool no_add_attrs = 0; int i; - for (i = 0; - i < ((int) (sizeof (attribute_tables) - / sizeof (attribute_tables[0]))); - i++) + for (i = 0; i < ARRAY_SIZE (attribute_tables); i++) { int j; |