diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2022-12-07 16:49:03 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2022-12-07 16:49:03 -0500 |
commit | 87d0f8988c9452428d5a250644ac4cb2acaf43bb (patch) | |
tree | 64b9d90acb73060413ec3065768d3f426c3319a7 /src/trie.c | |
parent | 2898d6b79d15c984f95977f7385dd4273087c61b (diff) | |
download | bfs-87d0f8988c9452428d5a250644ac4cb2acaf43bb.tar.xz |
trie: Use static_assert() instead of #error
Diffstat (limited to 'src/trie.c')
-rw-r--r-- | src/trie.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -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"))) |