On 6/18/19 3:26 PM, Bruno Haible wrote:
Do you see other options than
(a) reintroduce verify_true and check that it's usable in enum.
(b) relax the check and only check that it's usable as a static initializer.
Also (c) relax the check so that the buggy compiler passes but continue
to check that verify_expr is usable in an enum. Sort of a hack, but
there it is - it's arguably good enough since the (now-removed)
verify_true macro can also make that buggy compiler crash if we
complicate the test a bit. I installed the attached, which worked for me
on gcc111.
Version: 12.01.0000.0000
Quite possibly that compiler bug is fixed in xlc by now; IBM says the
current xlc 12.1 release is 12.1.0.21 dated January 2019. I don't know
who's maintaining gcc111 though.
https://www-01.ibm.com/support/docview.wss?uid=swg27038605#121021
>From 75acd2ec14fcc0b0695e8a108167562d65417f79 Mon Sep 17 00:00:00 2001
From: Paul Eggert <[email protected]>
Date: Tue, 18 Jun 2019 17:41:46 -0700
Subject: [PATCH] verify-tests: work around xlc bug
Problem reported by Bruno Haible in:
https://lists.gnu.org/r/bug-gnulib/2019-06/msg00049.html
* tests/test-verify.c (item): Move the arithmetic inside the
verify_expr, to avoid tickling a bug in IBM AIX xlc V12.1.
---
ChangeLog | 8 ++++++++
tests/test-verify.c | 2 +-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 3ab71a3d9..c76ac8852 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2019-06-18 Paul Eggert <[email protected]>
+
+ verify-tests: work around xlc bug
+ Problem reported by Bruno Haible in:
+ https://lists.gnu.org/r/bug-gnulib/2019-06/msg00049.html
+ * tests/test-verify.c (item): Move the arithmetic inside the
+ verify_expr, to avoid tickling a bug in IBM AIX xlc V12.1.
+
2019-06-16 Bruno Haible <[email protected]>
Restore Emacs time-stamp hook applicability.
diff --git a/tests/test-verify.c b/tests/test-verify.c
index 0afbcabde..98983c3c4 100644
--- a/tests/test-verify.c
+++ b/tests/test-verify.c
@@ -39,7 +39,7 @@ verify (1 == 1); verify (1 == 1); /* should be ok */
enum
{
- item = verify_expr (1 == 1, 10) * 0 + 17 /* should be ok */
+ item = verify_expr (1 == 1, 10 * 0 + 17) /* should be ok */
};
static int
--
2.21.0