Page MenuHomePhabricator

clang-cl: Add support for /permissive-
Needs RevisionPublic

Authored by thakis on Apr 24 2017, 7:58 AM.

Details

Reviewers
hans
majnemer
Summary

https://blogs.msdn.microsoft.com/vcblog/2016/11/16/permissive-switch/ makes it sound like this is similar to -pedantic, which we currently don't expose from clang-cl. So map it to that for now and see how that feels in practice.

Looks like cl.exe only has a flag for /permissive-, but no explicit flag for /permissive (the default).

Diff Detail

Event Timeline

thakis created this revision.Apr 24 2017, 7:58 AM
hans accepted this revision.Apr 24 2017, 8:49 AM

lgtm

This revision is now accepted and ready to land.Apr 24 2017, 8:49 AM
majnemer requested changes to this revision.Apr 24 2017, 8:55 AM
majnemer added a subscriber: majnemer.

I don't think this is correct. GDR (of Microsoft) says the behavior is different: https://www.reddit.com/r/cpp/comments/5dh7j5/visual_c_introduces_permissive_for_conformance/da5fxjj/

This revision now requires changes to proceed.Apr 24 2017, 8:55 AM
Trass3r added a subscriber: Trass3r.EditedSep 20 2019, 9:50 AM

Has this ever gotten anywhere?
I think the correct mapping would be something like -fno-ms-compatibility -fno-delayed-template-parsing, not sure about -fms-volatile -fms-extensions. Edit: Actually no, you need the extensions and disabling compat makes it disguise as gcc. So only the template parsing is left.