diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 848b9d32f95f3c71a894375bda889d6c1f4e784e..8cbf68cf2b8d7a408d10f3c1443725718a01b79d 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,9 @@
+2000-08-24  Greg McGary  <greg@mcgary.org>
+
+	* libiberty/cplus-dem.c (cplus_demangle_opname, cplus_mangle_opname,
+	demangle_expression, demangle_function_name): Use ARRAY_SIZE.
+	* libiberty/random.c (end_ptr): Likewise.
+
 2000-08-23  Alex Samuel  <samuel@codesourcery.com>
 
 	* cp-demangle.c (result_close_template_list): Remove function.
diff --git a/libiberty/cplus-dem.c b/libiberty/cplus-dem.c
index 0611d76d0f99dc8a48f4684819eea2204bf8e1a5..6156303ef1f45e61472ed609ac68f6e1fe264e50 100644
--- a/libiberty/cplus-dem.c
+++ b/libiberty/cplus-dem.c
@@ -1,5 +1,6 @@
 /* Demangler for GNU C++
-   Copyright 1989, 91, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
+   Copyright 1989, 1991, 1994, 1995, 1996, 1997, 1998, 1999,
+   2000 Free Software Foundation, Inc.
    Written by James Clark (jjc@jclark.uucp)
    Rewritten by Fred Fish (fnf@cygnus.com) for ARM and Lucid demangling
    Modified by Satish Pai (pai@apollo.hp.com) for HP demangling
@@ -705,7 +706,7 @@ cplus_demangle_opname (opname, result, options)
 	{
 	  /* Operator.  */
 	  size_t i;
-	  for (i = 0; i < sizeof (optable) / sizeof (optable[0]); i++)
+	  for (i = 0; i < ARRAY_SIZE (optable); i++)
 	    {
 	      if (strlen (optable[i].in) == 2
 		  && memcmp (optable[i].in, opname + 2, 2) == 0)
@@ -723,7 +724,7 @@ cplus_demangle_opname (opname, result, options)
 	    {
 	      /* Assignment.  */
 	      size_t i;
-	      for (i = 0; i < sizeof (optable) / sizeof (optable[0]); i++)
+	      for (i = 0; i < ARRAY_SIZE (optable); i++)
 		{
 		  if (strlen (optable[i].in) == 3
 		      && memcmp (optable[i].in, opname + 2, 3) == 0)
@@ -747,7 +748,7 @@ cplus_demangle_opname (opname, result, options)
 	  && memcmp (opname + 3, "assign_", 7) == 0)
 	{
 	  size_t i;
-	  for (i = 0; i < sizeof (optable) / sizeof (optable[0]); i++)
+	  for (i = 0; i < ARRAY_SIZE (optable); i++)
 	    {
 	      len1 = len - 10;
 	      if ((int) strlen (optable[i].in) == len1
@@ -764,7 +765,7 @@ cplus_demangle_opname (opname, result, options)
       else
 	{
 	  size_t i;
-	  for (i = 0; i < sizeof (optable) / sizeof (optable[0]); i++)
+	  for (i = 0; i < ARRAY_SIZE (optable); i++)
 	    {
 	      len1 = len - 3;
 	      if ((int) strlen (optable[i].in) == len1
@@ -811,7 +812,7 @@ cplus_mangle_opname (opname, options)
   int len;
 
   len = strlen (opname);
-  for (i = 0; i < sizeof (optable) / sizeof (optable[0]); i++)
+  for (i = 0; i < ARRAY_SIZE (optable); i++)
     {
       if ((int) strlen (optable[i].out) == len
 	  && (options & DMGL_ANSI) == (optable[i].flags & DMGL_ANSI)
@@ -1573,9 +1574,7 @@ demangle_expression (work, mangled, s, tk)
 
 	  len = strlen (*mangled);
 
-	  for (i = 0;
-	       i < sizeof (optable) / sizeof (optable [0]);
-	       ++i)
+	  for (i = 0; i < ARRAY_SIZE (optable); ++i)
 	    {
 	      size_t l = strlen (optable[i].in);
 
@@ -4430,7 +4429,7 @@ demangle_function_name (work, mangled, declp, scan)
       if (declp->p - declp->b >= 10 /* op$assign_ */
 	  && memcmp (declp->b + 3, "assign_", 7) == 0)
 	{
-	  for (i = 0; i < sizeof (optable) / sizeof (optable[0]); i++)
+	  for (i = 0; i < ARRAY_SIZE (optable); i++)
 	    {
 	      int len = declp->p - declp->b - 10;
 	      if ((int) strlen (optable[i].in) == len
@@ -4446,7 +4445,7 @@ demangle_function_name (work, mangled, declp, scan)
 	}
       else
 	{
-	  for (i = 0; i < sizeof (optable) / sizeof (optable[0]); i++)
+	  for (i = 0; i < ARRAY_SIZE (optable); i++)
 	    {
 	      int len = declp->p - declp->b - 3;
 	      if ((int) strlen (optable[i].in) == len
@@ -4494,7 +4493,7 @@ demangle_function_name (work, mangled, declp, scan)
       if (declp->b[4] == '\0')
 	{
 	  /* Operator.  */
-	  for (i = 0; i < sizeof (optable) / sizeof (optable[0]); i++)
+	  for (i = 0; i < ARRAY_SIZE (optable); i++)
 	    {
 	      if (strlen (optable[i].in) == 2
 		  && memcmp (optable[i].in, declp->b + 2, 2) == 0)
@@ -4511,7 +4510,7 @@ demangle_function_name (work, mangled, declp, scan)
 	  if (declp->b[2] == 'a' && declp->b[5] == '\0')
 	    {
 	      /* Assignment.  */
-	      for (i = 0; i < sizeof (optable) / sizeof (optable[0]); i++)
+	      for (i = 0; i < ARRAY_SIZE (optable); i++)
 		{
 		  if (strlen (optable[i].in) == 3
 		      && memcmp (optable[i].in, declp->b + 2, 3) == 0)
diff --git a/libiberty/random.c b/libiberty/random.c
index ef00da0a5ae2ffcd4d5ce925a2217c5d5c603d56..4e9b7ffafcc4ddb34d65cbb596ecf239dac29ca4 100644
--- a/libiberty/random.c
+++ b/libiberty/random.c
@@ -198,7 +198,7 @@ static int rand_type = TYPE_3;
 static int rand_deg = DEG_3;
 static int rand_sep = SEP_3;
 
-static long int *end_ptr = &randtbl[sizeof(randtbl) / sizeof(randtbl[0])];
+static long int *end_ptr = &randtbl[ARRAY_SIZE (randtbl)];
 
 /* Initialize the random number generator based on the given seed.  If the
    type is the trivial no-state-information type, just remember the seed.