Skip to content

Commit 4d0c7d7

Browse files
authored
Warn 32-bit users about their doom. (simdjson#783)
1 parent 74da47e commit 4d0c7d7

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

include/simdjson/portability.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,20 @@
1515
#define IS_ARM64 1
1616
#endif
1717

18+
#if (!defined(IS_X86_64)) && (!defined(IS_ARM64))
19+
#if _MSC_VER
20+
#pragma message("The simdjson library is designed\
21+
for 64-bit processors and it seems that you are not\
22+
compiling for a known 64-bit platform. All fast kernels\
23+
will be disabled and performance may be poor. Please\
24+
use a 64-bt target such as x64 or 64-bit ARM.")
25+
#else
26+
#error "The simdjson library is designed\
27+
for 64-bit processors. It seems that you are not\
28+
compiling for a known 64-bit platform."
29+
#endif
30+
#endif // (!defined(IS_X86_64)) && (!defined(IS_ARM64))
31+
1832
// this is almost standard?
1933
#undef STRINGIFY_IMPLEMENTATION_
2034
#undef STRINGIFY

0 commit comments

Comments
 (0)