]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
stdcountof-h tests: Fix compilation error with clang 21.
authorBruno Haible <bruno@clisp.org>
Mon, 8 Sep 2025 11:42:54 +0000 (13:42 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 8 Sep 2025 11:42:54 +0000 (13:42 +0200)
* tests/test-stdcountof-h.c (test_func): Don't use _gl_verify_is_array
if it's not defined.

ChangeLog
tests/test-stdcountof-h.c

index 829dcfa4aa68278ff9b24eae232089966cb76ecd..c31b13b15c0f377920424a4e67b3ca5af0042d19 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2025-09-08  Bruno Haible  <bruno@clisp.org>
+
+       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  <bruno@clisp.org>
 
        announce-gen: Improve efficiency of "git clone".
index 5d0a9a66119932de562fe40dc377af496d645327..b64bd9d58be420696c1a7f250d4275c4ca710ac4 100644 (file)
@@ -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);