Paul Eggert wrote: > Thanks, I looked for instances of similar problems and installed the > attached further patch. > 0001-malloc-etc.-tests-use-volatile-more-consistently.patch
The CI reports that this patch causes a compilation error on native Windows: x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -DEXEEXT=\".exe\" -DEXEEXT=\".exe\" -I. -I../../gltests -I.. -DGNULIB_STRICT_CHECKING=1 -DIN_GNULIB_TESTS=1 -I. -I../../gltests -I.. -I../../gltests/.. -I../gllib -I../../gltests/../gllib -Wall -DCONTINUE_AFTER_ASSERT -Wno-error -g -O2 -MT test-aligned_alloc.o -MD -MP -MF $depbase.Tpo -c -o test-aligned_alloc.o ../../gltests/test-aligned_alloc.c &&\ mv -f $depbase.Tpo $depbase.Po ../../gltests/test-aligned_alloc.c:31:55: error: 'aligned_alloc' undeclared here (not in a function); did you mean '_aligned_malloc'? 31 | void *(*volatile my_aligned_alloc) (size_t, size_t) = aligned_alloc; | ^~~~~~~~~~~~~ | _aligned_malloc make[4]: *** [Makefile:26050: test-aligned_alloc.o] Error 1 This patch should fix it. 2024-11-06 Bruno Haible <br...@clisp.org> aligned_alloc tests: Fix compilation error on mingw (regr. 2024-11-04). * tests/test-aligned_alloc.c (aligned_alloc): Don't redefine if aligned_alloc does not exist. diff --git a/tests/test-aligned_alloc.c b/tests/test-aligned_alloc.c index 61ca73fe05..89e236c9ea 100644 --- a/tests/test-aligned_alloc.c +++ b/tests/test-aligned_alloc.c @@ -28,9 +28,11 @@ #include "macros.h" +#if HAVE_ALIGNED_ALLOC void *(*volatile my_aligned_alloc) (size_t, size_t) = aligned_alloc; -#undef aligned_alloc -#define aligned_alloc my_aligned_alloc +# undef aligned_alloc +# define aligned_alloc my_aligned_alloc +#endif #define ROUNDUP(x,y) (((x) + (y) - 1) & - (y))