summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2023-11-09 15:16:04 -0500
committerTavian Barnes <tavianator@tavianator.com>2023-11-09 15:35:40 -0500
commite25261a90222de75781726a93ab809c660208afd (patch)
treeeed200bdebfd981821754a6bb154e3db30a109f5 /tests
parentc745df94a182b8a569cb833ecfbe8da33bf01f98 (diff)
downloadbfs-e25261a90222de75781726a93ab809c660208afd.tar.xz
config: Add (de)allocator attributes
Diffstat (limited to 'tests')
-rw-r--r--tests/alloc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/alloc.c b/tests/alloc.c
index 2334241..37b70bf 100644
--- a/tests/alloc.c
+++ b/tests/alloc.c
@@ -24,6 +24,10 @@ int main(void) {
bfs_verify(flex_size(8, 16, 4, 4, 1) == 16);
// Make sure we detect allocation size overflows
+#if __GNUC__ && !__clang__
+# pragma GCC diagnostic ignored "-Walloc-size-larger-than="
+#endif
+
bfs_verify(ALLOC_ARRAY(int, too_many) == NULL && errno == EOVERFLOW);
bfs_verify(ZALLOC_ARRAY(int, too_many) == NULL && errno == EOVERFLOW);
bfs_verify(ALLOC_FLEX(struct flexible, bar, too_many) == NULL && errno == EOVERFLOW);