diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2014-03-06 22:24:52 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2014-03-06 22:24:52 +0100 |
commit | 7500a5ea0bc4643c37f3ab8cbee8cb5e01678032 (patch) | |
tree | 39a2596f923c53e04a75d21976d93587829348e5 | |
parent | 9e989676d847aef894ae2172091a1af4219d651e (diff) | |
parent | a88a6358478165aae7681ac651220ce03d97bb30 (diff) | |
download | Nim-7500a5ea0bc4643c37f3ab8cbee8cb5e01678032.tar.gz |
Merge pull request #978 from ReneSac/devel
Added comment explaining 'assert_numbits' error.
-rw-r--r-- | lib/nimbase.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/nimbase.h b/lib/nimbase.h index f73dca190..1100e084b 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 |