Robert Dewar wrote:
> 
> and that is called a false positive if in fact the loop does
> not overrun. this sounds very dubious to me

The problem is that the compiler has no other information about the
number of iterations in the loop, otherwise it wouldn't spend cycles
on computing such estimations.  Because the compiler will use the
estimation for transforming the code, it should warn the user.

If I understand correctly, you would like a warning that says: "your
code is wrong: you access the array outside the allocated size".
Well, this is feasible, but then, the warning will be effective only
on loops that have statically determinable number of iterations.

In my opinion both these warnings are useful.

Sebastian

Reply via email to