]> git.ipfire.org Git - thirdparty/gcc.git/commit
c-family: Add some more ARRAY_SIZE uses
authorJakub Jelinek <jakub@redhat.com>
Fri, 9 Aug 2024 07:34:50 +0000 (09:34 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 9 Aug 2024 07:34:50 +0000 (09:34 +0200)
commit723e0f724e0c884a31ddf4a688604e7163ed31f2
treeeb2f4467b1a2227ee90373bd91a0e33de1d03243
parent19e565ed13972410451091a789fe58638d03b795
c-family: Add some more ARRAY_SIZE uses

These two spots were just non-standard, because they divided
sizeof (omp_pragmas_simd) by sizeof (*omp_pragmas) and not
the expected sizeof (*omp_pragmas_simd) and so weren't converted
into ARRAY_SIZE.  Both of the latter sizes are the same though,
as both arrays have the same type, so this patch doesn't change
anything but readability.

2024-08-09  Jakub Jelinek  <jakub@redhat.com>

* c-pragma.cc (c_pp_lookup_pragma): Use ARRAY_SIZE in
n_omp_pragmas_simd initializer.
(init_pragmas): Likewise.
gcc/c-family/c-pragma.cc