From e80c01b3068448c5de8359152b44a78e26942e6f Mon Sep 17 00:00:00 2001 From: Ivan Maidanski <ivmai@mail.ru> Date: Wed, 29 Nov 2017 11:44:17 +0300 Subject: [PATCH] Eliminate 'value exceeds maximum object size' GCC warning in huge_test * tests/huge_test.c [!GC_ATTR_ALLOC_SIZE] (GC_ATTR_ALLOC_SIZE): Define to empty (before include gc.h). --- tests/huge_test.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/huge_test.c b/tests/huge_test.c index 10d13ef2..bd3ad6c7 100644 --- a/tests/huge_test.c +++ b/tests/huge_test.c @@ -18,6 +18,13 @@ /* it fails predictably. */ #endif +#ifndef GC_ATTR_ALLOC_SIZE + /* Omit alloc_size attribute to avoid compiler warnings about */ + /* exceeding maximum object size when values close to GC_SWORD_MAX */ + /* are passed to GC_MALLOC. */ +# define GC_ATTR_ALLOC_SIZE(argnum) /* empty */ +#endif + #include "gc.h" /* -- 2.40.0