* tests/test-totalorder.h (main) [__IBMC__]: Skip the test.
* tests/test-totalordermag.h (main) [__IBMC__]: Likewise.
+2024-06-02 Bruno Haible <bruno@clisp.org>
+
+ totalorder*: Avoid compilation error by IBM XL C compiler.
+ * tests/test-totalorder.h (main) [__IBMC__]: Skip the test.
+ * tests/test-totalordermag.h (main) [__IBMC__]: Likewise.
+
2024-06-02 Bruno Haible <bruno@clisp.org>
isnanf, isnand, isnanl: Fix link errors on AIX 7.1 with xlc.
#include <stdio.h>
+/* Specification. */
#include <math.h>
-#include "infinity.h"
-#include "macros.h"
-#include "minus-zero.h"
-#include "signed-nan.h"
-#include "signed-snan.h"
+
+#if defined __IBMC__
+/* The IBM XL C compiler cannot compile the initializer of x[] below. */
+
+# include <stdio.h>
+
+int
+main ()
+{
+ fputs ("Skipping test: broken C compiler\n", stderr);
+ return 77;
+}
+
+#else
+
+# include "infinity.h"
+# include "macros.h"
+# include "minus-zero.h"
+# include "signed-nan.h"
+# include "signed-snan.h"
static TOTALORDER_TYPE
positive_NaN_with_payload (int payload)
{
negative_NaN_with_payload (1729),
negative_NaN_with_payload (641),
-#if TOTALORDER_HAVE_SNAN
+# if TOTALORDER_HAVE_SNAN
TOTALORDER_NEGATIVE_SNAN (),
-#endif
+# endif
{ -TOTALORDER_INF () },
{ -1e37 },
{ -1 },
{ 1 },
{ 1e37 },
{ TOTALORDER_INF () },
-#if TOTALORDER_HAVE_SNAN
+# if TOTALORDER_HAVE_SNAN
TOTALORDER_POSITIVE_SNAN (),
-#endif
+# endif
positive_NaN_with_payload (641),
positive_NaN_with_payload (1729)
};
return test_exit_status;
}
+
+#endif
#include <stdio.h>
+/* Specification. */
#include <math.h>
-#include "infinity.h"
-#include "macros.h"
-#include "minus-zero.h"
-#include "signed-nan.h"
-#include "signed-snan.h"
+
+#if defined __IBMC__
+/* The IBM XL C compiler cannot compile the initializer of x[] below. */
+
+# include <stdio.h>
+
+int
+main ()
+{
+ fputs ("Skipping test: broken C compiler\n", stderr);
+ return 77;
+}
+
+#else
+
+# include "infinity.h"
+# include "macros.h"
+# include "minus-zero.h"
+# include "signed-nan.h"
+# include "signed-snan.h"
static TOTALORDER_TYPE
positive_NaN_with_payload (int payload)
{
negative_NaN_with_payload (1729),
negative_NaN_with_payload (641),
-#if TOTALORDER_HAVE_SNAN
+# if TOTALORDER_HAVE_SNAN
TOTALORDER_NEGATIVE_SNAN (),
-#endif
+# endif
{ -TOTALORDER_INF () },
{ -1e37 },
{ -1 },
{ 1 },
{ 1e37 },
{ TOTALORDER_INF () },
-#if TOTALORDER_HAVE_SNAN
+# if TOTALORDER_HAVE_SNAN
TOTALORDER_POSITIVE_SNAN (),
-#endif
+# endif
positive_NaN_with_payload (641),
positive_NaN_with_payload (1729)
};
return test_exit_status;
}
+
+#endif