summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2022-12-07 16:49:03 -0500
committerTavian Barnes <tavianator@tavianator.com>2022-12-07 16:49:03 -0500
commit87d0f8988c9452428d5a250644ac4cb2acaf43bb (patch)
tree64b9d90acb73060413ec3065768d3f426c3319a7 /src
parent2898d6b79d15c984f95977f7385dd4273087c61b (diff)
downloadbfs-87d0f8988c9452428d5a250644ac4cb2acaf43bb.tar.xz
trie: Use static_assert() instead of #error
Diffstat (limited to 'src')
-rw-r--r--src/trie.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/trie.c b/src/trie.c
index caa38a7..08a99b5 100644
--- a/src/trie.c
+++ b/src/trie.c
@@ -103,9 +103,7 @@
#include <stdlib.h>
#include <string.h>
-#if CHAR_BIT != 8
-# error "This trie implementation assumes 8-bit bytes."
-#endif
+static_assert(CHAR_BIT == 8, "This trie implementation assumes 8-bit bytes.");
#if BFS_TARGET_CLONES && (__i386__ || __x86_64__)
# define TARGET_CLONES_POPCNT __attribute__((target_clones("popcnt", "default")))