chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-hackers] [PATCH 0/1] Fix spurious array bounds warnings on Open


From: Evan Hanson
Subject: [Chicken-hackers] [PATCH 0/1] Fix spurious array bounds warnings on OpenBSD
Date: Thu, 19 Jan 2017 22:20:11 +1300

Hi folks,

Here's a fix for #1107 that avoids futzing with feature macros or
standards flags while still dispelling the warnings on OpenBSD. It just
bumps the size of the C_block_item struct's data field from the smallest
possible value (1) to the largest possible value (INT_MAX). This doesn't
actually change CHICKEN's behaviour since that value is unused -- it's
just a hack to declare what is really a flexible array member in C99 --
but it will increase the array size that the compiler uses for bounds
analysis and as a result it will stop the unnecessary warnings.

I propose this as a solution rather than introducing "-std=c99" or some
other such flag since CHICKEN doesn't currently require a C99 compiler
and I'd prefer not to give up our C89 compatibility.

Let me know what you think,

Evan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]