diff options
Diffstat (limited to 'gcc/jit/jit-builtins.cc')
-rw-r--r-- | gcc/jit/jit-builtins.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/jit/jit-builtins.cc b/gcc/jit/jit-builtins.cc index b949b73..fb86c77 100644 --- a/gcc/jit/jit-builtins.cc +++ b/gcc/jit/jit-builtins.cc @@ -109,9 +109,7 @@ find_builtin_by_name (const char *in_name, We start at index 1 to skip the initial entry (BUILT_IN_NONE), which has a NULL name. */ - for (unsigned int i = 1; - i < sizeof (builtin_data) / sizeof (builtin_data[0]); - i++) + for (unsigned int i = 1; i < ARRAY_SIZE (builtin_data); i++) { const struct builtin_data& bd = builtin_data[i]; if (matches_builtin (in_name, bd)) @@ -320,7 +318,7 @@ static const char * const type_names[] = { static const char * get_string_for_type_id (enum jit_builtin_type type_id) { - gcc_assert (type_id < sizeof (type_names)/sizeof(type_names[0])); + gcc_assert (type_id < ARRAY_SIZE (type_names)); return type_names[type_id]; } |