[patch]: Merge from gnustep for obj-c. Remove warnings for target w64.

Danny Smith dansmister@gmail.com
Wed Nov 19 03:54:00 GMT 2008


>        * objc/objc.h (BOOL): Prevent redeclaration of BOOL, if already
> there.


--- gcc.orig/libobjc/objc/objc.h
+++ gcc/libobjc/objc/objc.h
@@ -39,8 +39,10 @@ extern "C" {
 #ifdef __vxworks
 typedef int BOOL;
 #else
+#ifndef BOOL
 typedef unsigned char  BOOL;
 #endif
+#endif
 #define YES   (BOOL)1
 #define NO    (BOOL)0


That doe not seem right.  It means that if w32api's windef.h is
included before the objc.h language header, then BOOL may be
equivalent to WINBOOL which is an int.  If if is included after then
is in an unsigned char.   Wouldn't it be better to just  #iundef BOOL
before the typedef?

Danny



More information about the Gcc-patches mailing list