aboutsummaryrefslogtreecommitdiff
path: root/gcc/cppexp.c
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>2002-03-03 14:07:39 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>2002-03-03 14:07:39 +0000
commitca7558fcc6fe1ccfcbc91c1f2017b6706eae4cf3 (patch)
tree22fa38b6c76c86b74f079f044047e56332102862 /gcc/cppexp.c
parentde2467532d9ac55ed1c208f5934d2273a544c35d (diff)
downloadgcc-ca7558fcc6fe1ccfcbc91c1f2017b6706eae4cf3.zip
gcc-ca7558fcc6fe1ccfcbc91c1f2017b6706eae4cf3.tar.gz
gcc-ca7558fcc6fe1ccfcbc91c1f2017b6706eae4cf3.tar.bz2
attribs.c (init_attributes, [...]): Use ARRAY_SIZE in lieu of explicit sizeof/sizeof.
* 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. From-SVN: r50255
Diffstat (limited to 'gcc/cppexp.c')
-rw-r--r--gcc/cppexp.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/cppexp.c b/gcc/cppexp.c
index 5a58556..5766a79 100644
--- a/gcc/cppexp.c
+++ b/gcc/cppexp.c
@@ -83,7 +83,6 @@ static const struct suffix vsuf_3[] = {
{ "ull", 1, 2 }, { "ULL", 1, 2 }, { "uLL", 1, 2 }, { "Ull", 1, 2 },
{ "llu", 1, 2 }, { "LLU", 1, 2 }, { "LLu", 1, 2 }, { "llU", 1, 2 }
};
-#define Nsuff(tab) (sizeof tab / sizeof (struct suffix))
/* Parse and convert what is presumably an integer in TOK. Accepts
decimal, hex, or octal with or without size suffixes. Returned op
@@ -157,9 +156,9 @@ parse_number (pfile, tok)
See the suffix tables, above. */
switch (end - p)
{
- case 1: sufftab = vsuf_1; nsuff = Nsuff(vsuf_1); break;
- case 2: sufftab = vsuf_2; nsuff = Nsuff(vsuf_2); break;
- case 3: sufftab = vsuf_3; nsuff = Nsuff(vsuf_3); break;
+ case 1: sufftab = vsuf_1; nsuff = ARRAY_SIZE (vsuf_1); break;
+ case 2: sufftab = vsuf_2; nsuff = ARRAY_SIZE (vsuf_2); break;
+ case 3: sufftab = vsuf_3; nsuff = ARRAY_SIZE (vsuf_3); break;
default: goto invalid_suffix;
}