> Your math is off-by-one; Foo+4 is legal, Foo+5 is not.
>

Ah, right, sorry - 4 elements, zero index, etc... thanks for the catch.

(case in point, I suppose)

So, yes, two different cases - one past the end should be silent, unless
provably dereferenced. Everything else... either silent if not proven to be
dereferenced, or a separate warning class (if LLVM is already relying on
this UB for optimizations then a warning does seem appropriate).

- David
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to