cvs-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Cvs-cvs] ccvs ./configure windows-NT/stdbool.h


From: Mark D. Baushke
Subject: [Cvs-cvs] ccvs ./configure windows-NT/stdbool.h
Date: Fri, 27 Jan 2006 07:38:54 +0000

CVSROOT:        /cvsroot/cvs
Module name:    ccvs
Branch:         
Changes by:     Mark D. Baushke <address@hidden>        06/01/27 07:38:54

Modified files:
        .              : configure 
        windows-NT     : stdbool.h 

Log message:
        Regenerated.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/configure.diff?tr1=1.432&tr2=1.433&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/windows-NT/stdbool.h.diff?tr1=1.4&tr2=1.5&r1=text&r2=text

Patches:
Index: ccvs/configure
diff -u ccvs/configure:1.432 ccvs/configure:1.433
--- ccvs/configure:1.432        Wed Jan 25 12:53:54 2006
+++ ccvs/configure      Fri Jan 27 07:38:52 2006
@@ -9983,7 +9983,7 @@
          _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__
+         #if defined __xlc__ || defined __GNUC__
           /* 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
@@ -9995,7 +9995,10 @@
              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.  */
+             our stdbool.h substitute should suffice.  We also test
+             this with GCC, where it should work, 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);
          #endif
@@ -10010,9 +10013,11 @@
 main ()
 {
 
+         *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);
 
   ;
   return 0;
Index: ccvs/windows-NT/stdbool.h
diff -u ccvs/windows-NT/stdbool.h:1.4 ccvs/windows-NT/stdbool.h:1.5
--- ccvs/windows-NT/stdbool.h:1.4       Wed Jan 25 12:55:16 2006
+++ ccvs/windows-NT/stdbool.h   Fri Jan 27 07:38:54 2006
@@ -85,23 +85,29 @@
 typedef bool _Bool;
 # endif
 #else
-# if 0
-#  if defined __HP_cc || defined __xlc__
-    /* Some HP-UX cc and AIX IBM C compiler versions have compiler bugs when
-       the built-in _Bool type is used.  See
-         http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
-         http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
-         http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html
-       Override it.  */
-#   define _Bool signed char
+# if !defined __GNUC__
+   /* If 0:
+        Some HP-UX cc and AIX IBM C compiler versions have compiler bugs when
+        the built-in _Bool type is used.  See
+          http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
+          http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
+          http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html
+        Similar bugs are likely with other compilers as well; this file
+        wouldn't be used if <stdbool.h> was working.
+        So we override the _Bool type.
+      If !0:
+        Need to define _Bool ourselves. As 'signed char' or as an enum type?
+        Use of a typedef, with SunPRO C, leads to a stupid
+          "warning: _Bool is a keyword in ISO C99".
+        Use of an enum type, with IRIX cc, leads to a stupid
+          "warning(1185): enumerated type mixed with another type".
+        The only benefit of the enum type, debuggability, is not important
+        with these compilers.  So use 'signed char' and no typedef.  */
+#  define _Bool signed char
 enum { false = 0, true = 1 };
-#  endif
 # else
-#  if defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1)
-    /* Avoid stupid "warning: _Bool is a keyword in ISO C99".  */
-#   define _Bool signed char
-enum { false = 0, true = 1 };
-#  else
+   /* With this compiler, trust the _Bool type if the compiler has it.  */
+#  if !0
 typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool;
 #  endif
 # endif




reply via email to

[Prev in Thread] Current Thread [Next in Thread]