* m4/realloc.m4 (_AC_FUNC_REALLOC_IF): Use 'volatile', to defeat an
ibm-clang optimization.
* m4/malloc.m4 (_AC_FUNC_MALLOC_IF): Likewise.
+2023-11-17 Bruno Haible <bruno@clisp.org>
+
+ realloc-gnu: Fix wrong configure test result with optimizing ibm-clang.
+ * m4/realloc.m4 (_AC_FUNC_REALLOC_IF): Use 'volatile', to defeat an
+ ibm-clang optimization.
+ * m4/malloc.m4 (_AC_FUNC_MALLOC_IF): Likewise.
+
2023-11-15 Paul Eggert <eggert@cs.ucla.edu>
striconveha: pacify gcc -Wcast-align
-# malloc.m4 serial 28
+# malloc.m4 serial 28.1
dnl Copyright (C) 2007, 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
[[#include <stdlib.h>
]],
[[void *p = malloc (0);
- int result = !p;
+ void * volatile vp = p;
+ int result = !vp;
free (p);
return result;]])
],
-# realloc.m4 serial 26
+# realloc.m4 serial 26.1
dnl Copyright (C) 2007, 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
[[#include <stdlib.h>
]],
[[void *p = realloc (0, 0);
- int result = !p;
+ void * volatile vp = p;
+ int result = !vp;
free (p);
return result;]])
],