diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2016-07-08 15:55:42 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2016-07-08 15:55:42 +0200 |
commit | 7f752db0e3986c8ba4f010bb0d5e959e748b5248 (patch) | |
tree | 1cf8a17f10c27ad9585c9602a12ba43fc03570bd /lib/nimbase.h | |
parent | abf1951ff0e26b5e018e8c87158060b02053fddb (diff) | |
download | Nim-7f752db0e3986c8ba4f010bb0d5e959e748b5248.tar.gz |
improve error message if C and Nim disagree on pointer size
Diffstat (limited to 'lib/nimbase.h')
-rw-r--r-- | lib/nimbase.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/nimbase.h b/lib/nimbase.h index d5a551352..3635ca006 100644 --- a/lib/nimbase.h +++ b/lib/nimbase.h @@ -102,7 +102,7 @@ __clang__ defined __ICL || \ defined __DMC__ || \ defined __BORLANDC__ ) -# define NIM_THREADVAR __declspec(thread) +# define NIM_THREADVAR __declspec(thread) /* note that ICC (linux) and Clang are covered by __GNUC__ */ #elif defined __GNUC__ || \ defined __SUNPRO_C || \ @@ -449,8 +449,8 @@ static inline void GCGuard (void *ptr) { asm volatile ("" :: "X" (ptr)); } /* Test to see if Nim and the C compiler agree 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]; + "error: 'Nim_and_C_compiler_disagree_on_target_architecture' declared as an array with a negative size" */ +typedef int Nim_and_C_compiler_disagree_on_target_architecture[sizeof(NI) == sizeof(void*) && NIM_INTBITS == sizeof(NI)*8 ? 1 : -1]; #endif #ifdef __cplusplus |