From: Bruno Haible Date: Mon, 8 Sep 2025 11:42:54 +0000 (+0200) Subject: stdcountof-h tests: Fix compilation error with clang 21. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=49c5d4bc35b57cd9ade99803f492f92aaea0bf8a;p=thirdparty%2Fgnulib.git stdcountof-h tests: Fix compilation error with clang 21. * tests/test-stdcountof-h.c (test_func): Don't use _gl_verify_is_array if it's not defined. --- diff --git a/ChangeLog b/ChangeLog index 829dcfa4aa..c31b13b15c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2025-09-08 Bruno Haible + + stdcountof-h tests: Fix compilation error with clang 21. + * tests/test-stdcountof-h.c (test_func): Don't use _gl_verify_is_array + if it's not defined. + 2025-09-08 Bruno Haible announce-gen: Improve efficiency of "git clone". diff --git a/tests/test-stdcountof-h.c b/tests/test-stdcountof-h.c index 5d0a9a6611..b64bd9d58b 100644 --- a/tests/test-stdcountof-h.c +++ b/tests/test-stdcountof-h.c @@ -42,17 +42,21 @@ test_func (int parameter[3]) (void) local_bounded; +#ifdef _gl_verify_is_array (void) _gl_verify_is_array (unbounded); (void) _gl_verify_is_array (bounded); (void) _gl_verify_is_array (multidimensional); +#endif ASSERT (countof (bounded) == 10); ASSERT (countof (multidimensional) == 10); ASSERT (countof (local_bounded) == 20); #if 0 /* These produce compilation errors. */ +# ifdef _gl_verify_is_array (void) _gl_verify_is_array (integer); (void) _gl_verify_is_array (parameter); +# endif ASSERT (countof (integer) >= 0); ASSERT (countof (unbounded) >= 0);