diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2025-05-26 10:26:12 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2025-05-26 10:45:45 -0400 |
commit | 89969b4b0bea3bd4cddf97c989ca63f3a1aaa07c (patch) | |
tree | 58a244a7121a0000313b2044c139df2340e72ee1 /src/bfs.h | |
parent | 6fa72ff42d95dfd883d59ce7cf6bdc74abebf015 (diff) | |
download | bfs-89969b4b0bea3bd4cddf97c989ca63f3a1aaa07c.tar.xz |
Add support for __attribute__((counted_by(...)))
Diffstat (limited to 'src/bfs.h')
-rw-r--r-- | src/bfs.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -219,6 +219,15 @@ extern const char bfs_ldlibs[]; #endif /** + * Mark the size of a flexible array member. + */ +#if __has_attribute(counted_by) +# define _counted_by(...) __attribute__((counted_by(__VA_ARGS__))) +#else +# define _counted_by(...) +#endif + +/** * Optimization hint to not unroll a loop. */ #if BFS_HAS_PRAGMA_NOUNROLL |