lang.c (lang_decode_option): Use ARRAY_SIZE.
authorGreg McGary <greg@mcgary.org>
Thu, 24 Aug 2000 20:34:39 +0000 (20:34 +0000)
committerGreg McGary <gkm@gcc.gnu.org>
Thu, 24 Aug 2000 20:34:39 +0000 (20:34 +0000)
* lang.c (lang_decode_option): Use ARRAY_SIZE.
* parse.y (BINOP_LOOKUP): Likewise.

From-SVN: r35951

gcc/java/ChangeLog
gcc/java/lang.c
gcc/java/parse.y

index 1addb289e19ebe0a410c616c5c99158e65d0d1b7..a7b75b4d5f81c6e37d5179f24fff9cb8f9c5ea06 100644 (file)
@@ -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>
         
        * lang-specs.h: Do not process -o or run the assembler if
index ae038967c68191a8ec1d0b37003b115832623b71..5f95f2d9c57dc1150150277c5d8909be60cdb2b4 100644 (file)
@@ -232,10 +232,7 @@ lang_decode_option (argc, argv)
 
       p += 2;
 
-      for (j = 0;
-          !found 
-          && j < (int)(sizeof (lang_f_options) / sizeof (lang_f_options[0]));
-          j++)
+      for (j = 0; !found && j < (int) ARRAY_SIZE (lang_f_options); j++)
        {
          if (!strcmp (p, lang_f_options[j].string))
            {
index dcebab9d01e358d2a3cc07788483a4311e01d6ec..d63d16d64e862a403417fcfcf006fcee6bd53759 100644 (file)
@@ -355,8 +355,7 @@ static enum tree_code binop_lookup[19] =
     EQ_EXPR, NE_EXPR, GT_EXPR, GE_EXPR, LT_EXPR, LE_EXPR,
    };
 #define BINOP_LOOKUP(VALUE)                                            \
-  binop_lookup [((VALUE) - PLUS_TK)%                                   \
-               (sizeof (binop_lookup) / sizeof (binop_lookup[0]))]
+  binop_lookup [((VALUE) - PLUS_TK) % ARRAY_SIZE (binop_lookup)]
 
 /* This is the end index for binary operators that can also be used
    in compound assignements. */