aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/utils.c7
2 files changed, 8 insertions, 4 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 875b3d5..2c9d3fd 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,8 @@
+2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * utils.c (init_gnat_to_gnu, init_gigi_decls): Use ARRAY_SIZE in
+ lieu of explicit sizeof/sizeof.
+
2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
* misc.c (copy_lang_decl): Remove.
diff --git a/gcc/ada/utils.c b/gcc/ada/utils.c
index ead4d02..224f431 100644
--- a/gcc/ada/utils.c
+++ b/gcc/ada/utils.c
@@ -6,7 +6,7 @@
* *
* C Implementation File *
* *
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
* *
* Copyright (C) 1992-2001, Free Software Foundation, Inc. *
* *
@@ -165,7 +165,7 @@ init_gnat_to_gnu ()
ggc_add_tree_root (&signed_and_unsigned_types[0][0],
(sizeof signed_and_unsigned_types
/ sizeof signed_and_unsigned_types[0][0]));
- ggc_add_tree_root (float_types, sizeof float_types / sizeof float_types[0]);
+ ggc_add_tree_root (float_types, ARRAY_SIZE (float_types));
ggc_add_root (&current_binding_level, 1, sizeof current_binding_level,
mark_binding_level);
@@ -692,8 +692,7 @@ init_gigi_decls (long_long_float_type, exception_type)
DECL_BUILT_IN_CLASS (setjmp_decl) = BUILT_IN_NORMAL;
DECL_FUNCTION_CODE (setjmp_decl) = BUILT_IN_SETJMP;
- ggc_add_tree_root (gnat_std_decls,
- sizeof gnat_std_decls / sizeof gnat_std_decls[0]);
+ ggc_add_tree_root (gnat_std_decls, ARRAY_SIZE (gnat_std_decls));
}
/* This routine is called in tree.c to print an error message for invalid use