<div dir="ltr"><div class="gmail_extra" style>Hey Duncan,</div><div class="gmail_extra" style><br></div><div class="gmail_extra">On Sun, Apr 7, 2013 at 11:22 AM, Duncan Sands <span dir="ltr"><<a href="mailto:baldrick@free.fr" target="_blank">baldrick@free.fr</a>></span> wrote:<br>
<div class="gmail_quote"><div>... </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
can't front-ends implement this themselves using the "select" constant<br>
expression?  For example, rather than dividing by "x" you can divide by<br>
"x == 0 ? 1 : x".<br></blockquote><div><br></div><div style>I'm not sure that I follow. I would like to see the division by zero execute and trap at runtime.</div><div style><br></div><div style>For example, x = 2/0. It looks like your suggestion would generate the expression 2/1, which wouldn't trap as expected. </div>
<div style><br></div><div style>Am I misinterpreting your suggestion?</div><div style><br></div><div style>Thanks,</div><div style>Cameron</div><div style><br></div><div style>P.S. Is it your intention to hide the simple constant expression from the constant folder? I.e. (x == 0) ? 0 : x. </div>
<div style> </div></div></div></div>