From a88a6358478165aae7681ac651220ce03d97bb30 Mon Sep 17 00:00:00 2001 From: ReneSac Date: Thu, 6 Mar 2014 18:18:25 -0300 Subject: [PATCH] Added comment explaining 'assert_numbits' error. --- lib/nimbase.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/nimbase.h b/lib/nimbase.h index f73dca1900..1100e084b3 100644 --- a/lib/nimbase.h +++ b/lib/nimbase.h @@ -373,5 +373,8 @@ static inline void GCGuard (void *ptr) { asm volatile ("" :: "X" (ptr)); } # define GC_GUARD #endif +/* Test to see if nimrod and the C compiler agrees on the size of a pointer. + On disagreement, your C compiler will say something like: + "error: 'assert_numbits' declared as an array with a negative size" */ typedef int assert_numbits[sizeof(NI) == sizeof(void*) && NIM_INTBITS == sizeof(NI)*8 ? 1 : -1]; #endif