changeset 6788:96f27aa2aa1d

* 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.
author Paul Eggert <eggert@cs.ucla.edu>
date Mon, 15 May 2006 02:37:03 +0000
parents caee82d64491
children 662184414244
files m4/ChangeLog m4/stdbool.m4
diffstat 2 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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-05-11  Simon Josefsson  <jas@extundo.com>
 
 	* xvasprintf.m4: Fix obvious typo.
--- a/m4/stdbool.m4
+++ b/m4/stdbool.m4
@@ -64,9 +64,9 @@
 	  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];