<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 25, 2017 at 2:12 PM, 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 Tue, Apr 25, 2017 at 4:14 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span>On Tue, Apr 25, 2017 at 11:42 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"><div class="gmail_extra"><div class="gmail_quote"><span class="m_-6830458119703436074m_1121526070804523099gmail-">On Tue, Apr 25, 2017 at 2:06 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>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: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"><span>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_-6830458119703436074m_1121526070804523099gmail-m_6420714047204473935gmail-m_-3618732300883475148m_37024072976568555m_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><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><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-ref<wbr>erence, 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></span><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></div></blockquote><div><br></div></span><div>CL has added a /Zc:twoPhase for that (not yet released anywhere), and Hans added support for that to clang-cl a while ago. Some blog post (maybe the one I linked to?) says that they're thinking of possibly enabling /Zc:twoPhase when /permissive- is passed, but at the moment it's independent. (In part because /permissive- ships in VC2017 and /Zc:twoPhase hasn't been shipped yet).</div></div></div></div></blockquote><div><br></div></span><div>Ok.</div><span><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><br>What's the advantage of making it an error?</div></div></div></div></blockquote><div><br></div></span><div>All the diagnostics they show in <a href="https://blogs.msdn.microsoft.com/vcblog/2016/11/16/permissive-switch/" target="_blank">https://blogs.msdn.microsof<wbr>t.com/vcblog/2016/11/16/<wbr>permissive-switch/</a> diagnose as errors.</div></div></div></div></blockquote><div><br></div></span><div>But why should we match that? Having them be warnings seems like a better user experience to me.</div></div></div></div></blockquote><div><br></div><div>I think the thinking behind the flag is that they want folks to be able to make their code more standards compliant. I imagine that anybody who turns the flag on understands what they are getting themselves into.</div><div><br></div><div>IMO, the biggest reason why it should match their diagnostic level is because builds could otherwise break if a project has /permissive- but clang-cl allows a build to continue while cl would not.</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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span><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> If it's a warning, you can pass -Werror separately if you want. And SFINAE'ing on this seems like asking for trouble.</div></div></div></div></blockquote><div><br></div></span><div>I said nothing about permitting SFINAE on these errors.</div><span><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"><span class="m_-6830458119703436074m_1121526070804523099gmail-"><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"><span><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"><span><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_-6830458119703436074m_1121526070804523099gmail-m_6420714047204473935gmail-m_-3618732300883475148m_37024072976568555m_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_-6830458119703436074m_1121526070804523099gmail-m_6420714047204473935gmail-m_-3618732300883475148m_37024072976568555m_3144184257609406068gmail-m_-4758722162144248601gmail-HOEnZb"><div class="m_-6830458119703436074m_1121526070804523099gmail-m_6420714047204473935gmail-m_-3618732300883475148m_37024072976568555m_3144184257609406068gmail-m_-4758722162144248601gmail-h5"><div class="gmail_extra"><br><div class="gmail_quote"><span class="m_-6830458119703436074m_1121526070804523099gmail-m_6420714047204473935gmail-m_-3618732300883475148m_37024072976568555m_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_-6830458119703436074m_1121526070804523099gmail-m_6420714047204473935gmail-m_-3618732300883475148m_37024072976568555m_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_-6830458119703436074m_1121526070804523099gmail-m_6420714047204473935gmail-m_-3618732300883475148m_37024072976568555m_3144184257609406068gmail-m_-4758722162144248601gmail-m_4667927108851127819HOEnZb"><div class="m_-6830458119703436074m_1121526070804523099gmail-m_6420714047204473935gmail-m_-3618732300883475148m_37024072976568555m_3144184257609406068gmail-m_-4758722162144248601gmail-m_4667927108851127819h5"><div class="gmail_extra"><br><div class="gmail_quote"><span class="m_-6830458119703436074m_1121526070804523099gmail-m_6420714047204473935gmail-m_-3618732300883475148m_37024072976568555m_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_-6830458119703436074m_1121526070804523099gmail-m_6420714047204473935gmail-m_-3618732300883475148m_37024072976568555m_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_-6830458119703436074m_1121526070804523099gmail-m_6420714047204473935gmail-m_-3618732300883475148m_37024072976568555m_3144184257609406068gmail-"><div><div class="m_-6830458119703436074m_1121526070804523099gmail-m_6420714047204473935gmail-m_-3618732300883475148m_37024072976568555m_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_-6830458119703436074m_1121526070804523099gmail-m_6420714047204473935gmail-m_-3618732300883475148m_37024072976568555m_3144184257609406068gmail-m_-4758722162144248601gmail-m_4667927108851127819m_-3989594810322791703h5"><span class="m_-6830458119703436074m_1121526070804523099gmail-m_6420714047204473935gmail-m_-3618732300883475148m_37024072976568555m_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_-6830458119703436074m_1121526070804523099gmail-m_6420714047204473935gmail-m_-3618732300883475148m_37024072976568555m_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_-6830458119703436074m_1121526070804523099gmail-m_6420714047204473935gmail-m_-3618732300883475148m_37024072976568555m_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></span></div><br></div></div>
</blockquote></span></div><br></div></div>
</blockquote></span></div><br></div></div>
</blockquote></span></div><br></div></div>
</blockquote></div><br></div></div>