<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Jan 14, 2013, at 2:56 PM, Nick Lewycky <<a href="mailto:nlewycky@google.com">nlewycky@google.com</a>> wrote:</div><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 14 January 2013 14:52, Nick Lewycky <span dir="ltr"><<a href="mailto:nlewycky@google.com" target="_blank">nlewycky@google.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto; "><div dir="ltr"><div>This patch adds the -reverse-order flag which reverses the order of evaluation of simple (non-complex non-aggregate) assignment expressions (eg., "a() = b();" where a() returns int& and b() returns int). The idea is to provide a debugging tool that we can use to identify bugs in user code caused by order of evaluation problems. As a starting point, I've only reversed one such evaluation (one that causes me much grief), but I'd also like to change the order of function parameter evaluation. Others may be added on an as-needed basis.</div>



</div></blockquote></div></div></div></blockquote><br></div><div>This is an interesting idea, but I'm pretty worried about it.  I understand</div><div>that this isn't your intent, but in effect you *are* talking about</div><div>implementing a knob that can be tweaked by users (even if it's an internal</div><div>option that we don't document and never claim to support) in order to force</div><div>a particular evaluation order on the compiler.  Especially when you're</div><div>talking about extending it to (accidentally, no doubt!) exactly match GCC's</div><div>argument evaluation.</div><div><br></div><div>Basically, it sounds an awful lot like something that some understaffed</div><div>porting effort or over-conservative platform maintainer will eventually</div><div>make us regret ever implementing.</div><div><br></div><div>Is there some way you can achieve your goal that doesn't leave us</div><div>vulnerable to that?</div><div><br></div><div>John.</div></body></html>