This changes the fallback definition of C_block_item used for non-C99 compilers to use a slight variation on the "struct hack", where instead of using 1 for the size of its data field, we use the largest possible size. This increases the value that the compiler uses for bound analysis in order to stop the array size warnings.
Fixes #1107. --- chicken.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chicken.h b/chicken.h index e610f419..92c169e9 100644 --- a/chicken.h +++ b/chicken.h @@ -770,7 +770,7 @@ typedef struct C_block_struct #if (__STDC_VERSION__ >= 199901L) C_word data[]; #else - C_word data[ 1 ]; + C_word data[ INT_MAX ]; #endif } C_SCHEME_BLOCK; -- 2.11.0 _______________________________________________ Chicken-hackers mailing list Chicken-hackers@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-hackers