+2023-12-01 Paul Eggert <eggert@cs.ucla.edu>
+
+ frexp, frexpf: pacify clang re address-of-volatile
+ Problem reported by Sam James in:
+ https://lists.gnu.org/r/bug-gnulib/2023-12/msg00013.html
+ * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Don’t try to convert
+ ‘double volatile *’ to ‘void const *’ as the C standard
+ doesn’t allow accessing volatile variables through
+ pointer-to-nonvolatile.
+ * m4/frexpf.m4 (gl_FUNC_FREXPF_WORKS): Likewise.
+
2023-12-01 Bruno Haible <bruno@clisp.org>
obstack: Avoid undefined behaviour.
-# frexp.m4 serial 16
+# frexp.m4 serial 16.1
dnl Copyright (C) 2007-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,
{
int exp;
double y = frexp (x, &exp);
- if (memcmp (&y, &x, sizeof x))
+ double x1 = x;
+ if (memcmp (&y, &x1, sizeof x1))
result |= 4;
}
return result;
-# frexpf.m4 serial 6
+# frexpf.m4 serial 6.1
dnl Copyright (C) 2011-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,
{
int exp;
float y = frexpf (x, &exp);
- if (memcmp (&y, &x, sizeof x))
+ float x1 = x;
+ if (memcmp (&y, &x1, sizeof x1))
result |= 2;
}
return result;