<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Thu, Jul 13, 2017 at 5:13 PM Peter Lawrence via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">David,<br>
Here is the definition accepted by Hal of what we’re doing<br>
<br>
> 1. Sometimes there are abstraction penalties in C++ code<br>
> 2. That can be optimized away after template instantiation, function inlining, etc<br>
> 3. When they for example exhibit this pattern<br>
> if (A) {<br>
> stuff;<br>
> } else {<br>
> other stuff including “undefined behavior”;<br>
> }<br>
> 4. Where the compiler assumes “undefined behavior” doesn’t actually happen because<br>
> In the C language standard it is the users responsibility to avoid it<br>
> 5. Therefore in this example the compiler can a) delete the else-clause<br>
> b) delete the if-cond, c) assume A is true and propagate that information<br>
<br>
<br>
<br>
We are actively deleting undefined behavior, and the question is why<br>
given that doing so potentially masks a real source code bug.<br>
At the very least deleting undefined behavior should not be the default.<br></blockquote><div><br></div><div>You are asserting this (again), but others have clearly stated that they disagree. David gave detailed and clear reasons why. Continuing to re-state positions is not productive.</div><div><br></div><div>-Chandler</div></div></div>