This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch]: Merge from gnustep for obj-c. Remove warnings for target w64.
- From: "Danny Smith" <dansmister at gmail dot com>
- To: "Kai Tietz" <Kai dot Tietz at onevision dot com>
- Cc: "GCC Patches" <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 19 Nov 2008 15:58:14 +1300
- Subject: Re: [patch]: Merge from gnustep for obj-c. Remove warnings for target w64.
- References: <OFBE4B8C5E.25AE2676-ONC1257505.00379431-C1257505.003868B4@onevision.de>
> * 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