From: Bruno Haible <bruno@clisp.org>
Date: Wed, 25 Jan 2006 13:55:43 +0000 (+0000)
Subject: Avoid excessive warnings with IRIX cc.
X-Git-Tag: cvs-readonly~2581
X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=68800be09baa98d1e3038b98c80fa67e1527cfe1;p=gnulib.git

Avoid excessive warnings with IRIX cc.
---

diff --git a/lib/ChangeLog b/lib/ChangeLog
index e11c699947..9981fb5dca 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,3 +1,9 @@
+2006-01-24  Bruno Haible  <bruno@clisp.org>
+
+	* stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
+	warnings.
+	Reported by Paul Eggert.
+
 2006-01-25  Jim Meyering  <jim@meyering.net>
 
 	* fileblocks.c: Remove more useless parentheses.
@@ -10,7 +16,7 @@
 	Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
 	2005-11-26.
 
-	* stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc] : Define as 'signed char'
+	* stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as 'signed char'
 	to avoid problems with the built-in _Bool type.
 	Reported by Paul Eggert on 2005-11-26.
 
diff --git a/lib/stdbool_.h b/lib/stdbool_.h
index db16581a2f..1b4ae8d920 100644
--- a/lib/stdbool_.h
+++ b/lib/stdbool_.h
@@ -90,8 +90,11 @@ typedef bool _Bool;
 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".  */
+#  if (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1)) || (defined __sgi && !defined __GNUC__)
+    /* With SunPRO C, avoid stupid
+         "warning: _Bool is a keyword in ISO C99".
+       With IRIX cc, avoid stupid
+         "warning(1185): enumerated type mixed with another type".  */
 #   define _Bool signed char
 enum { false = 0, true = 1 };
 #  else