<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Chandler,<div class="">               The only thing David made clear that wasn’t already clear</div><div class="">is that he believes UB to be “comparatively rare”, which is in agreement</div><div class="">with what Hal already said which is that he does not expect deleting</div><div class="">UB will be of benefit to for example SPEC benchmarks.</div><div class=""><br class=""></div><div class="">Given that it is “comparatively rare”, why all the effort to delete it ?</div><div class="">And why make deleting it the default rather than warning about it ?</div><div class=""><br class=""></div><div class="">Peter</div><div class=""><br class=""></div><div class=""><br class=""><div class=""><div><blockquote type="cite" class=""><div class="">On Jul 13, 2017, at 2:15 PM, Chandler Carruth <<a href="mailto:chandlerc@gmail.com" class="">chandlerc@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_quote"><div dir="ltr" class="">On Thu, Jul 13, 2017 at 5:13 PM Peter Lawrence via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">David,<br class="">
          Here is the definition accepted by Hal of what we’re doing<br class="">
<br class="">
> 1. Sometimes there are abstraction penalties in C++ code<br class="">
> 2. That can be optimized away after template instantiation, function inlining, etc<br class="">
> 3. When they for example exhibit this pattern<br class="">
>       if (A) {<br class="">
>               stuff;<br class="">
>       } else {<br class="">
>               other stuff including “undefined behavior”;<br class="">
>       }<br class="">
> 4. Where the compiler assumes “undefined behavior” doesn’t actually happen because<br class="">
>    In the C language standard it is the users responsibility to avoid it<br class="">
> 5. Therefore in this example the compiler can a) delete the else-clause<br class="">
>     b) delete the if-cond, c) assume A is true and propagate that information<br class="">
<br class="">
<br class="">
<br class="">
We are actively deleting undefined behavior, and the question is why<br class="">
given that doing so potentially masks a real source code bug.<br class="">
At the very least deleting undefined behavior should not be the default.<br class=""></blockquote><div class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class="">-Chandler</div></div></div>
</div></blockquote></div><br class=""></div></div></body></html>