# HG changeset patch # User Bruno Haible # Date 1138197343 0 # Node ID 3045472dc80085090ed1b43e0c13cb83e5414bcc # Parent 7b85e525fd50c80fea3edac225e2990039d52f48 Avoid excessive warnings with IRIX cc. diff --git a/lib/ChangeLog b/lib/ChangeLog --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,9 @@ +2006-01-24 Bruno Haible + + * stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid + warnings. + Reported by Paul Eggert. + 2006-01-25 Jim Meyering * fileblocks.c: Remove more useless parentheses. @@ -10,7 +16,7 @@ Report and patch by Albert Chin-A-Young 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 --- a/lib/stdbool_.h +++ b/lib/stdbool_.h @@ -90,8 +90,11 @@ 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