summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2006-05-15 03:17:08 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2006-05-15 03:17:08 +0000
commit48138763f05fa312089223282f2a162117f2f8d9 (patch)
tree3eb44ae48aae81ad1f50b2834a95b7726abc9b86
parent3c51d8f36f83badfcd798ab803597d259877dd42 (diff)
downloadcoreutils-48138763f05fa312089223282f2a162117f2f8d9.tar.xz
(AC_HEADER_STDBOOL): Fix overly-picky
test for C99 conformance; (bool) 0.5 is an integer constant expression, but (bool) -0.5 is not. Problem reported by Fedor Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
-rw-r--r--m4/ChangeLog7
-rw-r--r--m4/stdbool.m44
2 files changed, 9 insertions, 2 deletions
diff --git a/m4/ChangeLog b/m4/ChangeLog
index 6d584a076..c984e9bb9 100644
--- a/m4/ChangeLog
+++ b/m4/ChangeLog
@@ -1,3 +1,10 @@
+2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
+
+ * stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
+ test for C99 conformance; (bool) 0.5 is an integer constant
+ expression, but (bool) -0.5 is not. Problem reported by Fedor
+ Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
+
2006-02-17 Eric Blake <ebb9@byu.net>
Sync from gnulib.
diff --git a/m4/stdbool.m4 b/m4/stdbool.m4
index 43fbe2815..2204ecd98 100644
--- a/m4/stdbool.m4
+++ b/m4/stdbool.m4
@@ -64,9 +64,9 @@ AC_DEFUN([AC_HEADER_STDBOOL],
char a[true == 1 ? 1 : -1];
char b[false == 0 ? 1 : -1];
char c[__bool_true_false_are_defined == 1 ? 1 : -1];
- char d[(bool) -0.5 == true ? 1 : -1];
+ char d[(bool) 0.5 == true ? 1 : -1];
bool e = &s;
- char f[(_Bool) -0.0 == false ? 1 : -1];
+ char f[(_Bool) 0.0 == false ? 1 : -1];
char g[true];
char h[sizeof (_Bool)];
char i[sizeof s.t];