From b8cfcdfd9cb7fb73b0067d814ed2b716c42230b2 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Wed, 29 Nov 2017 11:44:17 +0300 Subject: [PATCH] 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). --- tests/huge_test.c | 7 +++++++ 1 file changed, 7 insertions(+) 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" /* -- 2.40.0