<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 13, 2023, 04:26 John Cowan <<a href="mailto:cowan@ccil.org">cowan@ccil.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:"times new roman",serif;font-size:large"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Mar 12, 2023 at 7:40 AM Dan Cross <<a href="mailto:crossd@gmail.com" target="_blank" rel="noreferrer">crossd@gmail.com</a>> wrote:<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"></blockquote></div></div><div dir="auto">It is certainly a shame that modern compiler writers have become essentially hostile to programmers in their pursuit of ever more aggressive optimizations based on rigid readings of the standard, common sense be damned.</div></div></blockquote><div><br></div><div class="gmail_default" style="font-family:"times new roman",serif;font-size:large">Not at all.  It is clear that mainstream C and C++ compilers optimize for the features most important to mainstream C and C++ programmers, which are:</div><div class="gmail_default" style="font-family:"times new roman",serif;font-size:large"><br></div><div class="gmail_default" style="font-family:"times new roman",serif;font-size:large">1) Execution speed.</div><div class="gmail_default" style="font-family:"times new roman",serif;font-size:large"><br></div><div class="gmail_default" style="font-family:"times new roman",serif;font-size:large">2) Execution speed.</div><div class="gmail_default" style="font-family:"times new roman",serif;font-size:large"><br></div><div class="gmail_default" style="font-family:"times new roman",serif;font-size:large">3) I lied; there is no 3.</div><div class="gmail_default" style="font-family:"times new roman",serif;font-size:large"><br></div><div class="gmail_default" style="font-family:"times new roman",serif;font-size:large">If those are not your priorities, use a non-mainstream compiler or a different programming language.</div></div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Or you can ask GCC to respect your view of the language with things like -fno-strict-aliasing, -fwrapv, and -fno-trapv.</div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div>