From: Ivan Maidanski Date: Wed, 29 Nov 2017 08:44:17 +0000 (+0300) Subject: Eliminate 'value exceeds maximum object size' GCC warning in huge_test X-Git-Tag: v7.6.2~16 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=012fc6c87963fd9cae17fd1f3f44024e65b92884;p=gc 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). --- 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" /*