[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc-patches
Subject:    Re: [C PATCH] Simple compile-time array bounds checking
From:       Dirk Mueller <dmuell () gmx ! net>
Date:       2007-01-13 19:40:40
Message-ID: 200701132040.40831.dmuell () gmx ! net
[Download RAW message or body]

On Saturday, 13. January 2007 16:48, Roger Sayle wrote:

> One extension of your approach may be also add/re-use your code during
> gimplification or the front-ends.  Many of cases you're trying to catch,
> including the f() examples listed in PR 8268, don't require VRP to
> propagate constants into array indices, and hence can be emitted even with
> -O1 or -O0, and perhaps even -fsyntax-only.

In fact, I've tried that and it seems to fail miserably in practice. The 
reason for that is dead code (expanded for example from glibc #define's) 
producing out of bounds accesses and triggering many false warnings. This 
happens almost everywhere, to the level of making the warning unusable. 


Dirk
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic