From 89969b4b0bea3bd4cddf97c989ca63f3a1aaa07c Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Mon, 26 May 2025 10:26:12 -0400 Subject: Add support for __attribute__((counted_by(...))) --- src/bfs.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/bfs.h') diff --git a/src/bfs.h b/src/bfs.h index 32dbbae..3cee727 100644 --- a/src/bfs.h +++ b/src/bfs.h @@ -218,6 +218,15 @@ extern const char bfs_ldlibs[]; # define _target_clones(...) #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. */ -- cgit v1.2.3