diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/diag.h | 10 | ||||
-rw-r--r-- | src/ioq.c | 3 | ||||
-rw-r--r-- | src/trie.c | 2 |
3 files changed, 2 insertions, 13 deletions
@@ -13,16 +13,6 @@ #include <stdarg.h> /** - * static_assert() with an optional second argument. - */ -#if __STDC_VERSION__ >= C23 -# define bfs_static_assert static_assert -#else -# define bfs_static_assert(...) bfs_static_assert_(__VA_ARGS__, #__VA_ARGS__, ) -# define bfs_static_assert_(expr, msg, ...) _Static_assert(expr, msg) -#endif - -/** * A source code location. */ struct bfs_loc { @@ -180,8 +180,7 @@ typedef atomic uintptr_t ioq_slot; /** Amount to add for an additional skip. */ #define IOQ_SKIP_ONE (~IOQ_BLOCKED) -// Need room for two flag bits -bfs_static_assert(alignof(struct ioq_ent) >= (1 << 2)); +static_assert(alignof(struct ioq_ent) >= (1 << 2), "struct ioq_ent is underaligned"); /** * An MPMC queue of I/O commands. @@ -90,7 +90,7 @@ #include <stdint.h> #include <string.h> -bfs_static_assert(CHAR_WIDTH == 8); +static_assert(CHAR_WIDTH == 8, "This trie implementation assumes 8-bit bytes."); #if __i386__ || __x86_64__ # define _trie_clones _target_clones("popcnt", "default") |