Add error message to pointer size check assert in lib/nimbase.h (#19549)

This commit is contained in:
Tomohiro 2022-02-27 23:36:16 +09:00 • committed by GitHub
commit c870ff5946
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -547,7 +547,7 @@ static inline void GCGuard (void *ptr) { asm volatile ("" :: "X" (ptr)); }
#endif #endif
// Test to see if Nim and the C compiler agree on the size of a pointer. // Test to see if Nim and the C compiler agree on the size of a pointer.
NIM_STATIC_ASSERT(sizeof(NI) == sizeof(void*) && NIM_INTBITS == sizeof(NI)*8, ""); NIM_STATIC_ASSERT(sizeof(NI) == sizeof(void*) && NIM_INTBITS == sizeof(NI)*8, "Pointer size mismatch between Nim and C/C++ backend. You probably need to setup the backend compiler for target CPU.");
#ifdef USE_NIM_NAMESPACE #ifdef USE_NIM_NAMESPACE
} }