[LLVMbugs] [Bug 11126] New: Mac OS X (Lion): “error : unknown type name 'BOOL'; did you mean 'BOOL'? ” when using LLVM 3 .0 (Xcode 4.2)
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Oct 13 13:21:08 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=11126
Summary: Mac OS X (Lion): “error: unknown type name 'BOOL'; did
you mean 'BOOL'?” when using LLVM 3.0 (Xcode 4.2)
Product: clang
Version: trunk
Platform: Macintosh
OS/Version: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: Frontend
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: noloader at gmail.com
CC: llvmbugs at cs.uiuc.edu
My apologies if this is not a front end issue.
When compiling the following code fragment using LLVM 3.0 on Lion with Intel
x64 hardware (MacBook):
// AppConstants.h
typedef enum { ThreadPriorityLow = NSOperationQueuePriorityLow,
ThreadPriorityNormal = NSOperationQueuePriorityNormal, ThreadPriorityHigh =
NSOperationQueuePriorityHigh, ThreadPriorityDefault = ThreadPriorityNormal }
ThreadPriority;
static inline BOOL IsValidThreadPriority(ThreadPriority priority)
{
return priority == ThreadPriorityLow || priority == ThreadPriorityNormal ||
priority == ThreadPriorityHigh;
}
The compiler spits out an error:
“error: unknown type name 'BOOL'; did you mean 'BOOL'?”
I can right click on the offending BOOL in Xcode, and Xcode will happily jump
to the definition in <objc/objc.h>. Though I'm using precompiled headers (so
the declaration should be available), including <objc/objc.h> directly did
*not* resolve the issue.
Switching to GCC 4.2 resolved the issue.
Also filed as an Apple Bug: Radar 10278815. Reported to LLVM since Apple can
move very slowly at times. My apologies if Apple has pushed it upstream
already.
$ uname -a
Darwin newton 11.2.0 Darwin Kernel Version 11.2.0: Tue Aug 9 20:54:00 PDT
2011; root:xnu-1699.24.8~1/RELEASE_X86_64 x86_64
$ clang --version
Apple clang version 3.0 (tags/Apple/clang-211.10.1) (based on LLVM 3.0svn)
Target: x86_64-apple-darwin11.2.0
Thread model: posix
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list