]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* lib/autoconf/headers.m4 (AC_HEADER_STDBOOL): Fix overly-picky
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 15 May 2006 02:22:28 +0000 (02:22 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 15 May 2006 02:22:28 +0000 (02:22 +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>.

ChangeLog
lib/autoconf/headers.m4

index aab2a782b931dfbcfb01558eb0914ea97f3ecde1..a67e3826fdeda434a21c117ad3834a1e33b8261b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * lib/autoconf/headers.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-05-13  Paul Eggert  <eggert@cs.ucla.edu>
 
        * doc/autoconf.texi (Particular Programs): AC_PROG_MKDIR_P now
index d3f9225ce6c869dd720731872c452f965d1cafb3..af8fb4980e5b5ac576d011cd364fceb47d737603 100644 (file)
@@ -582,9 +582,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];