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.4.8~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b8cfcdfd9cb7fb73b0067d814ed2b716c42230b2;p=gc Eliminate 'value exceeds maximum object size' GCC warning in huge_test (Cherry-pick commit 012fc6c8 from 'release-7_6' branch.) * 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 bde9836d..649ea4bb 100644 --- a/tests/huge_test.c +++ b/tests/huge_test.c @@ -10,6 +10,13 @@ # define GC_IGNORE_WARN #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" /*