(AC_HEADER_STDBOOL): Check for buggy compiler that

has _Bool but mishandles _Bool |= _Bool.
This commit is contained in:
Paul Eggert
2005-12-13 19:41:57 +00:00
parent a867264a18
commit eaebfec990
2 changed files with 10 additions and 1 deletions
+5
View File
@@ -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
+5 -1
View File
@@ -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])])