| Summary: | configure bug __has_feature macro not detected | ||
|---|---|---|---|
| Product: | SDL | Reporter: | skaller <skaller> |
| Component: | build | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | amaranth72 |
| Version: | HG 2.1 | ||
| Hardware: | x86 | ||
| OS: | Mac OS X 10.6 | ||
Can you check to see if this fixes it? https://hg.libsdl.org/SDL/rev/65a23b7b43c7 Thanks! I think a more robust way would be to check whether '__has_feature' is defined, rather than just checking which compiler was used. Is it a simple macro? I agree that would be a better fix if we can simply do && defined(__has_feature) Yeah, that totally works, thanks! :) https://hg.libsdl.org/SDL/rev/5bbfdfa38bfc Yeah, it's listed as a macro here http://clang.llvm.org/docs/LanguageExtensions.html#feature-checking-macros , and Xcode sees it as a macro too. |
using gcc 4.2 (the default) on Mac OSX 10.6.8 CC build/SDL_dynapi.lo In file included from /Users/johnskaller/SDL/src/dynapi/SDL_dynapi.c:31: include/SDL_syswm.h:211:39: error: missing binary operator before token "(" The fault appears to be here: #if defined(__OBJC__) && __has_feature(objc_arc) that the __has_feature macro is not supported by gcc 4.2. The code works fine with my clang 3.3svn. Gcc cannot be upgraded on OSX. Therefore: Either the configure script should check for clang on OSX and use that as the default, or this macro must be configured out (since it can't be supported by any gcc on OSX).