From: Ivan Maidanski Date: Sun, 4 Mar 2012 10:43:47 +0000 (+0400) Subject: Fix GC_init static assertion for clang/x64 (Darwin) X-Git-Tag: gc7_2~41 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c285b2999965d0625d621d54e73ae0959c3edf79;p=gc Fix GC_init static assertion for clang/x64 (Darwin) * misc.c (GC_init): Add a workaround for clang/x64 (coming with Xcode 4.3) which cannot process the static assertion on ((ptr_t)-1 > 0) correctly. --- diff --git a/misc.c b/misc.c index 2fd41664..8db60851 100644 --- a/misc.c +++ b/misc.c @@ -930,7 +930,8 @@ GC_API void GC_CALL GC_init(void) GC_STATIC_ASSERT((word)(-1) > (word)0); /* word should be unsigned */ # endif -# if !defined(__BORLANDC__) && !defined(__CC_ARM) /* Workaround */ +# if !defined(__BORLANDC__) && !defined(__CC_ARM) \ + && !(defined(__clang__) && defined(X86_64)) /* Workaround */ GC_STATIC_ASSERT((ptr_t)(word)(-1) > (ptr_t)0); /* Ptr_t comparisons should behave as unsigned comparisons. */ # endif