]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
AC_HEADER_STDBOOL: avoid spurious clang failure
authorEric Blake <eblake@redhat.com>
Mon, 23 Aug 2010 20:35:48 +0000 (14:35 -0600)
committerEric Blake <eblake@redhat.com>
Mon, 23 Aug 2010 20:36:13 +0000 (14:36 -0600)
* lib/autoconf/headers.m4 (AC_HEADER_STDBOOL): Drop gcc (and by
extension clang) check in favor of a gnulib test.  Force failure,
rather than merely testing for a compiler extension.
* THANKS: Update.
Reported by Anders Kaseorg.

Signed-off-by: Eric Blake <eblake@redhat.com>
ChangeLog
THANKS
lib/autoconf/headers.m4

index 6d7bd7f55edf7c27ca75ae0c8c2ae78eb97e9b64..9b271940df23fe85dbc488a3d8d8ef8f6604b4d0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2010-08-23  Eric Blake  <eblake@redhat.com>
+
+       AC_HEADER_STDBOOL: avoid spurious clang failure
+       * lib/autoconf/headers.m4 (AC_HEADER_STDBOOL): Drop gcc (and by
+       extension clang) check in favor of a gnulib test.  Force failure,
+       rather than merely testing for a compiler extension.
+       * THANKS: Update.
+       Reported by Anders Kaseorg.
+
 2010-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        doc: AIX sed dislikes indented comments.
diff --git a/THANKS b/THANKS
index 8f2691e1b1a0a8320598ab160e43bd11b7e647b9..c79e21e2aa515b28a0c6d9079648f02bff6644b6 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -27,6 +27,7 @@ Alfred G. de Wijn           dwijn@iluvatar.eu.org
 Alfred M. Szmidt            ams@gnu.org
 Allan Caffee                allan.caffee@gmail.com
 Allan Clark                 allanc@chickenandporn.com
+Anders Kaseorg              andersk@MIT.EDU
 Andreas Buening             andreas.buening@nexgo.de
 Andreas Jaeger              aj@suse.de
 Andreas Schott              schott@rzg.mpg.de
index c8d34c0c27c3d67882844e0e3de0987739b348f2..b97e09a90a70e196ea6ff60d9f07dcc0754b1a2a 100644 (file)
@@ -639,7 +639,7 @@ AC_DEFUN([AC_HEADER_STDBOOL],
        _Bool n[m];
        char o[sizeof n == m * sizeof n[0] ? 1 : -1];
        char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
-#      if defined __xlc__ || defined __GNUC__
+#      if defined __xlc__
         /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0
            reported by James Lemley on 2005-10-05; see
            http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html
@@ -651,12 +651,12 @@ AC_DEFUN([AC_HEADER_STDBOOL],
            Let us hope that IBM fixes the xlc bug, and also adds
            support for this kind of constant expression.  In the
            meantime, this test will reject xlc, which is OK, since
-           our stdbool.h substitute should suffice.  We also test
-           this with GCC, where it should work, to detect more
+           the gnulib stdbool.h substitute should suffice.  Gnulib
+           also tests this case in test-stdbool.c, to detect more
            quickly whether someone messes up the test in the
            future.  */
         char digs[] = "0123456789";
-        int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1);
+        int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : 0);
 #      endif
        /* Catch a bug in an HP-UX C compiler.  See
           http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html