<br>
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Your math is off-by-one; Foo+4 is legal, Foo+5 is not.<br></blockquote><div><br>Ah, right, sorry - 4 elements, zero index, etc... thanks for the catch.<br>
<br>(case in point, I suppose)<br><br>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).<br>
<br>- David<br></div></div>