chicken-hackers
[Top][All Lists]
Advanced

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

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


From: Peter Bex
Subject: Re: [Chicken-hackers] [PATCH 0/1] Fix spurious array bounds warnings on OpenBSD
Date: Sat, 21 Jan 2017 15:14:12 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

On Sat, Jan 21, 2017 at 03:09:53PM +0100, Peter Bex wrote:
> On Sat, Jan 21, 2017 at 03:01:37PM +0100, Kooda wrote:
> > I tried this patch on master on OpenBSD 6, and it errors out directly
> > with this message: 
> > chicken.h:773: error: size of array 'data' is too large
> 
> I still think it's much better to declare that CHICKEN requires a C99
> compatible compiler, and remove the conditional, using [] always.

Also, note that using foo[1] apparently can cause bad code generation
on some versions of GCC: https://lkml.org/lkml/2015/2/18/407

The Linux kernel fixed this by using foo[0], instead.  Using a flexible
array in all cases (thus requiring C99) seems much saner to me.

Cheers,
Peter

Attachment: signature.asc
Description: Digital signature


reply via email to

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