summaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2012-03-04 11:43:47 +0100
committerIvan Maidanski <ivmai@mail.ru>2012-03-04 11:43:47 +0100
commitc285b2999965d0625d621d54e73ae0959c3edf79 (patch)
tree8868eb663cf0efb14aa887743f11d077eca4c26c /misc.c
parente7e1a6e0e4997d8504f676de274c2dea0697c27d (diff)
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.
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/misc.c b/misc.c
index 2fd4166..8db6085 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