Building a testdir of all of Gnulib with clang 22, I get a compilation error:
../../gltests/test-float-h.c:39:5: error: use of undeclared identifier
'FLT_IS_IEC_60559'
39 | FLT_IS_IEC_60559 /* added in ISO C 23 */
| ^~~~~~~~~~~~~~~~
../../gltests/test-float-h.c:60:5: error: use of undeclared identifier
'DBL_IS_IEC_60559'
60 | DBL_IS_IEC_60559 /* added in ISO C 23 */
| ^~~~~~~~~~~~~~~~
../../gltests/test-float-h.c:81:5: error: use of undeclared identifier
'LDBL_IS_IEC_60559'
81 | LDBL_IS_IEC_60559 /* added in ISO C 23 */
| ^~~~~~~~~~~~~~~~~
../../gltests/test-float-h.c:284:11: error: use of undeclared identifier
'FLT_IS_IEC_60559'
284 | ASSERT (FLT_IS_IEC_60559);
| ^~~~~~~~~~~~~~~~
../../gltests/test-float-h.c:381:11: error: use of undeclared identifier
'DBL_IS_IEC_60559'
381 | ASSERT (DBL_IS_IEC_60559);
| ^~~~~~~~~~~~~~~~
../../gltests/test-float-h.c:459:7: error: use of undeclared identifier
'LDBL_IS_IEC_60559'
459 | if (LDBL_IS_IEC_60559)
| ^~~~~~~~~~~~~~~~~
../../gltests/test-float-h.c:522:7: error: use of undeclared identifier
'LDBL_IS_IEC_60559'
522 | if (LDBL_IS_IEC_60559)
| ^~~~~~~~~~~~~~~~~
7 errors generated.
make[4]: *** [Makefile:29461: test-float-h.o] Error 1
The problem is that the configure test has reported
checking whether float.h conforms to ISO C23... yes
with the consequence that gnulib's float.h override was not generated.
This patch fixes it.
2026-03-01 Bruno Haible <[email protected]>
float-h: Ensure ISO C23 compliance with clang 22.
* m4/float_h.m4 (gl_FLOAT_H): Test also whether the provided <float.h>
defines {FLT,DBL,LDBL}_IS_IEC_60559.
diff --git a/m4/float_h.m4 b/m4/float_h.m4
index 8af5bbff0b..c0ee7f8fdd 100644
--- a/m4/float_h.m4
+++ b/m4/float_h.m4
@@ -1,5 +1,5 @@
# float_h.m4
-# serial 16
+# serial 17
dnl Copyright (C) 2007, 2009-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -63,6 +63,7 @@ AC_DEFUN([gl_FLOAT_H]
[AC_LANG_PROGRAM(
[[#include <float.h>
int x[] = { FLT_DECIMAL_DIG, DBL_DECIMAL_DIG, LDBL_DECIMAL_DIG };
+ int y[] = { FLT_IS_IEC_60559, DBL_IS_IEC_60559, LDBL_IS_IEC_60559
};
float maxf = FLT_NORM_MAX;
double maxd = DBL_NORM_MAX;
long double maxl = LDBL_NORM_MAX;