lang.c (lang_decode_option): Use ARRAY_SIZE.
* lang.c (lang_decode_option): Use ARRAY_SIZE. * parse.y (BINOP_LOOKUP): Likewise. From-SVN: r35951
This commit is contained in:
parent
75ff2ca73b
commit
6e2aa220c0
@ -1,3 +1,8 @@
|
|||||||
|
2000-08-24 Greg McGary <greg@mcgary.org>
|
||||||
|
|
||||||
|
* lang.c (lang_decode_option): Use ARRAY_SIZE.
|
||||||
|
* parse.y (BINOP_LOOKUP): Likewise.
|
||||||
|
|
||||||
2000-08-21 Nix <nix@esperi.demon.co.uk>
|
2000-08-21 Nix <nix@esperi.demon.co.uk>
|
||||||
|
|
||||||
* lang-specs.h: Do not process -o or run the assembler if
|
* lang-specs.h: Do not process -o or run the assembler if
|
||||||
|
@ -232,10 +232,7 @@ lang_decode_option (argc, argv)
|
|||||||
|
|
||||||
p += 2;
|
p += 2;
|
||||||
|
|
||||||
for (j = 0;
|
for (j = 0; !found && j < (int) ARRAY_SIZE (lang_f_options); j++)
|
||||||
!found
|
|
||||||
&& j < (int)(sizeof (lang_f_options) / sizeof (lang_f_options[0]));
|
|
||||||
j++)
|
|
||||||
{
|
{
|
||||||
if (!strcmp (p, lang_f_options[j].string))
|
if (!strcmp (p, lang_f_options[j].string))
|
||||||
{
|
{
|
||||||
|
@ -355,8 +355,7 @@ static enum tree_code binop_lookup[19] =
|
|||||||
EQ_EXPR, NE_EXPR, GT_EXPR, GE_EXPR, LT_EXPR, LE_EXPR,
|
EQ_EXPR, NE_EXPR, GT_EXPR, GE_EXPR, LT_EXPR, LE_EXPR,
|
||||||
};
|
};
|
||||||
#define BINOP_LOOKUP(VALUE) \
|
#define BINOP_LOOKUP(VALUE) \
|
||||||
binop_lookup [((VALUE) - PLUS_TK)% \
|
binop_lookup [((VALUE) - PLUS_TK) % ARRAY_SIZE (binop_lookup)]
|
||||||
(sizeof (binop_lookup) / sizeof (binop_lookup[0]))]
|
|
||||||
|
|
||||||
/* This is the end index for binary operators that can also be used
|
/* This is the end index for binary operators that can also be used
|
||||||
in compound assignements. */
|
in compound assignements. */
|
||||||
|
Loading…
Reference in New Issue
Block a user