<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 29, 2014 at 1:37 PM, Reid Kleckner <span dir="ltr"><<a href="mailto:rnk@google.com" target="_blank">rnk@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class=""><div class="gmail_extra"><div class="gmail_quote">On Tue, Apr 29, 2014 at 1:06 PM, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@google.com" target="_blank">chandlerc@google.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I think reducing the proliferation of pragmas is a good thing, so let's implement the GCC syntax.  We can add support for the MSVC syntax later.  We probably want to defer that because the primary use case for it is working around MSVC miscompiles.</div>


</div></blockquote><div><br></div></div><div>Why doesn't this logic apply to both? I don't *really* care how it is spelled (I agree with Renato that we can discourage it regardless) I'm just not sure that the concern of existing usage primarily working around compiler-specific miscompiles is MSVC specific.</div>


</div></div></div>
</blockquote></div><br></div></div><div class="gmail_extra">Usually these workarounds have a version check around them that we miss, like _MSC_VER < 1700.  I wonder if the same is true for __GNUC__ usage.</div><div class="gmail_extra">

<br></div><div class="gmail_extra">It also occurs to me that if we add this pragma, users might use it to work around "miscompiles" of invalid user code.  On the other hand, it's not like Clang is bug-free either.</div>
</blockquote></div><br>Yea, I'm just curious why we don't want a clang-specific spelling so that we don't pick up any of these. :: shrug :: Note that we emulate a GCC version that is not useful for reasoning about live miscompile bugs.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">I would still try to spell it the same as GCCs if convenient: "#pragma clang optimize 0" or whatever.</div></div>