<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 25, 2017 at 8:46 AM, Nico Weber <span dir="ltr"><<a href="mailto:thakis@chromium.org" target="_blank">thakis@chromium.org</a>></span> wrote:<br><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"><span class="">On Mon, Apr 24, 2017 at 10:00 PM, David Majnemer <span dir="ltr"><<a href="mailto:david.majnemer@gmail.com" target="_blank">david.majnemer@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="m_3144184257609406068gmail-">On Mon, Apr 24, 2017 at 11:56 AM, Nico Weber <span dir="ltr"><<a href="mailto:thakis@chromium.org" target="_blank">thakis@chromium.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">"Opting into the conforming mode, /permissive-, during the series of VS 2017 update is a commitment to keeping your code base clean and to fixing non-conforming constructs we fix conformance issues in Visual C++." [...] "By contrast /permissive- offers a useful conformance mode where input C++ code is interpreted according to ISO C++ rules but also allows conforming extensions necessary to compile C++ on targets supported by Visual C++."<div><br></div><div>I guess the second quote agrees with your interpretation.</div><div><br></div><div>We already diag most of the things they already mention. The one thing we don't diag by default is Wmicrosoft-enum-forward-ref<wbr>erence since that's only an Extension and not an ExtWarn. We don't expose -pedantic from clang-cl, so this seemed like a somewhat natural mapping to me.</div><div><br></div><div>Should /permissive- map to -Wmicrosoft instead and turn on the parts of -Wmicrosoft that are Extensions?</div></div></blockquote><div><br></div></span><div>Did you mean on or off?</div></div></div></div></blockquote><div><br></div></span><div>On.</div><span class=""><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="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>I think that their intent is that things like __declspec remain OK.</div></div></div></div></blockquote><div><br></div></span><div>Nothing in -Wmicrosoft warns on __declspec.</div><span class=""><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="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>They want to diagnose non-conforming extensions like crazy template stuff, bogus typedef syntax, bad main function definitions, etc.</div></div></div></div></blockquote><div><br></div></span><div>Right. The only thing it currently makes cl warn on that clang-cl doesn't warn on by default is Wmicrosoft-enum-forward-<wbr>reference, which is an Extension warning, not an ExtWarn. So mapping /permissive- to -Wmicrosoft would make clang-cl diagnose forward-declared enums like it does with 2017 cl.</div></div></div></div></blockquote><div><br></div><div>Ok, sounds like it diagnoses the same sorts of things. They diagnose as error though, I think we should too. What about -fdelayed-template-parsing? Shouldn't that be disabled?</div><div> </div><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"><span class=""><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="ltr"><div class="gmail_extra"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="m_3144184257609406068gmail-"><div dir="ltr"><div> Should we just ignore /permissive- and possibly make some of our -Wmicrosoft Extensions ExtWarns instead?</div></div></span><div class="m_3144184257609406068gmail-m_-4758722162144248601gmail-HOEnZb"><div class="m_3144184257609406068gmail-m_-4758722162144248601gmail-h5"><div class="gmail_extra"><br><div class="gmail_quote"><span class="m_3144184257609406068gmail-">On Mon, Apr 24, 2017 at 2:10 PM, David Majnemer <span dir="ltr"><<a href="mailto:david.majnemer@gmail.com" target="_blank">david.majnemer@gmail.com</a>></span> wrote:<br></span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="m_3144184257609406068gmail-"><div dir="ltr">-pedantic means "Issue all the warnings demanded by strict ISO C and ISO C++; reject all programs that use forbidden extensions, and some other programs that do not follow ISO C and ISO C++."<div>I believe it is more akin to -fno-ms-compatibility as it disables compatibility hacks.<br></div></div></span><div class="m_3144184257609406068gmail-m_-4758722162144248601gmail-m_4667927108851127819HOEnZb"><div class="m_3144184257609406068gmail-m_-4758722162144248601gmail-m_4667927108851127819h5"><div class="gmail_extra"><br><div class="gmail_quote"><span class="m_3144184257609406068gmail-">On Mon, Apr 24, 2017 at 11:02 AM, Nico Weber <span dir="ltr"><<a href="mailto:thakis@chromium.org" target="_blank">thakis@chromium.org</a>></span> wrote:<br></span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="m_3144184257609406068gmail-"><div dir="auto">It does sound pretty similar to me from the blog post. I think this is a decent place to start from.</div></span><div class="gmail_extra"><br><div class="gmail_quote"><span class="m_3144184257609406068gmail-"><div><div class="m_3144184257609406068gmail-m_-4758722162144248601gmail-m_4667927108851127819m_-3989594810322791703h5">On Apr 24, 2017 11:55 AM, "David Majnemer via Phabricator via cfe-commits" <<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>> wrote:<br type="attribution"></div></div></span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="m_3144184257609406068gmail-m_-4758722162144248601gmail-m_4667927108851127819m_-3989594810322791703h5"><span class="m_3144184257609406068gmail-">majnemer requested changes to this revision.<br>
majnemer added a comment.<br>
This revision now requires changes to proceed.<br>
<br></span>
I don't think this is correct. GDR (of Microsoft) says the behavior is different: <a href="https://www.reddit.com/r/cpp/comments/5dh7j5/visual_c_introduces_permissive_for_conformance/da5fxjj/" rel="noreferrer" target="_blank">https://www.reddit.com/r/cpp/c<wbr>omm</a>                LOG(INFO) << "n_window_index: " << n_window_index;</div><div class="m_3144184257609406068gmail-m_-4758722162144248601gmail-m_4667927108851127819m_-3989594810322791703h5"><a href="https://www.reddit.com/r/cpp/comments/5dh7j5/visual_c_introduces_permissive_for_conformance/da5fxjj/" rel="noreferrer" target="_blank">ents/5dh7j5/visual_c_introduce<wbr>s_permissive_for_conformance/d<wbr>a5fxjj/</a><br>
<br>
<br>
<a href="https://reviews.llvm.org/D32435" rel="noreferrer" target="_blank">https://reviews.llvm.org/D3243<wbr>5</a><br>
<br>
<br>
<br></div></div><span class="m_3144184257609406068gmail-"><span>
______________________________<wbr>_________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-commits</a><br>
</span></span></blockquote></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div></div>
</blockquote></span></div><br></div></div>
</blockquote></div><br></div></div>