This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C PATCH] Simple compile-time array bounds checking


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]