]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(AC_HEADER_STDBOOL): Check for buggy compiler that
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 13 Dec 2005 19:41:57 +0000 (19:41 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 13 Dec 2005 19:41:57 +0000 (19:41 +0000)
has _Bool but mishandles _Bool |= _Bool.

m4/ChangeLog
m4/stdbool.m4

index 25dad52d11177401f88c8a6b3524943e8c8358c2..206ae17789be29085dcee257572aed528a0490af 100644 (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
index 59d38e07508ccb59989ed944b4c2091dc7a973f8..86ae312d4365d4bda71d139e4b92958604bb0770 100644 (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])])