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/gcc.c | |
parent | 9b6f7c7a867d1e11dd2460454e5912fc56102d28 (diff) | |
download | gcc-3585dac7a9c88a562d5b231e74a121bea751ba95.tar.gz |
* 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/gcc.c')
-rw-r--r-- | gcc/gcc.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c index 69e4f7fbfc0..ead8ffa10a2 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -858,8 +858,7 @@ static const struct compiler default_compilers[] = /* Number of elements in default_compilers, not counting the terminator. */ -static int n_default_compilers - = (sizeof default_compilers / sizeof (struct compiler)) - 1; +static const int n_default_compilers = ARRAY_SIZE (default_compilers) - 1; /* A vector of options to give to the linker. These options are accumulated by %x, @@ -3686,8 +3685,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n" #ifdef MODIFY_TARGET_NAME is_modify_target_name = 0; - for (j = 0; - j < sizeof modify_target / sizeof modify_target[0]; j++) + for (j = 0; j < ARRAY_SIZE (modify_target); j++) if (! strcmp (argv[i], modify_target[j].sw)) { char *new_name @@ -3822,7 +3820,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n" #ifdef MODIFY_TARGET_NAME is_modify_target_name = 0; - for (j = 0; j < sizeof modify_target / sizeof modify_target[0]; j++) + for (j = 0; j < ARRAY_SIZE (modify_target); j++) if (! strcmp (argv[i], modify_target[j].sw)) is_modify_target_name = 1; |