<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On 16 June 2017 at 00:35, John Regehr via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
void F(int a)<br>
{<br>
    if (a == a) do_stuff();<br>
}<br>
<br>
....<br>
main()<br>
{<br>
    int x;<br>
    F(x);<br>
}<br>
</blockquote>
<br></span>
This C program unconditionally executes UB and any translation at all is acceptable -- end of story.<br></blockquote><div><br></div><div>I understand that is the "letter of the law". However, I can see the argument for something that behaves in a predictable way, whether for example F is defined in a header file or in a separate translation unit - and I believe the example here is one where that would make a difference - even if the compller is perfectly fine to produce something that plays the theme tune to Mony Python's Flying Circus or prints 42 on the screen, instead of whatever "do_stuff" does.<br><br>--</div><div>Mats </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
John<div class="HOEnZb"><div class="h5"><br>
<br>
______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
</div></div></blockquote></div><br></div></div>