diff options
-rw-r--r-- | m4/ChangeLog | 5 | ||||
-rw-r--r-- | m4/stdbool.m4 | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/m4/ChangeLog b/m4/ChangeLog index 25dad52d1..206ae1778 100644 --- a/m4/ChangeLog +++ b/m4/ChangeLog @@ -1,3 +1,8 @@ +2005-12-13 Paul Eggert <eggert@cs.ucla.edu> + + * stdbool.m4 (AC_HEADER_STDBOOL): Check for buggy compiler that + has _Bool but mishandles _Bool |= _Bool. + 2005-12-07 Paul Eggert <eggert@cs.ucla.edu> * stat-time.m4 (gl_STAT_TIME): Add check for diff --git a/m4/stdbool.m4 b/m4/stdbool.m4 index 59d38e075..86ae312d4 100644 --- a/m4/stdbool.m4 +++ b/m4/stdbool.m4 @@ -83,11 +83,15 @@ AC_DEFUN([AC_HEADER_STDBOOL], char digs[] = "0123456789"; int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1); #endif + _Bool q = true; + _Bool *pq = &q; ], [ + *pq |= q; + *pq |= ! q; /* Refer to every declared value, to avoid compiler optimizations. */ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l - + !m + !n + !o + !p); + + !m + !n + !o + !p + !q + !pq); ], [ac_cv_header_stdbool_h=yes], [ac_cv_header_stdbool_h=no])]) |