summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
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);