]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(AC_HEADER_STDBOOL): Fix overly-picky
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 15 May 2006 03:17:08 +0000 (03:17 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 15 May 2006 03:17:08 +0000 (03:17 +0000)
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>.

m4/ChangeLog
m4/stdbool.m4

index 6d584a076fa2e79cd5a4cdfd53a887f5b09e7058..c984e9bb9f20c7edd5a6bed1a2d727d8e3593366 100644 (file)
@@ -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.
index 43fbe281543ab3716adb8c607ac92440e4047533..2204ecd98405be59e1a8ef52d6fbd464f61552f7 100644 (file)
@@ -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];