From 05c7a7c0d8e29ebd879552d42fafaec8f66858a6 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 15 May 2006 02:37:03 +0000 Subject: [PATCH] * 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. --- m4/ChangeLog | 7 +++++++ m4/stdbool.m4 | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/m4/ChangeLog b/m4/ChangeLog index b27909abb..8dd25f6fc 100644 --- a/m4/ChangeLog +++ b/m4/ChangeLog @@ -1,3 +1,10 @@ +2006-05-14 Paul Eggert + + * 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 . + 2006-05-11 Simon Josefsson * xvasprintf.m4: Fix obvious typo. 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]; -- 2.11.0