[cfe-commits] r142797 - in /cfe/trunk: lib/Frontend/CompilerInvocation.cpp test/Lexer/ms-extensions.c

David Blaikie dblaikie at gmail.com
Mon Oct 24 11:04:39 PDT 2011


> -fms-extensions = allow Microsoft extensions without sacrificing language conformance
>
> -fms-compatibility = do crazy non-standard things to try to eat the broken code that Microsoft's compiler accepts. In other words, try to be as MSVC-like as Clang can be.

Well it means "eat the broken code that Microsoft's compiler accepts"
but in some cases (I believe) the same code compiles with both
compilers but may have different semantics, right? So if I'm ever
compiling my code with MSVC I sort of want to compile/test it with
-fms-compatibility to make sure I don't get subtle changes in behavior
due to different name lookup, for example. Or is this perhaps a 3rd
distinction that isn't explicitly captured by either of these flags (&
instead is a subset of ms-compatibility)? Ideally I don't want to
depend on those differences either way (in any case where standard C++
would find a different name from MSVC I'd like a warning/error so I
can avoid it) & then I wouldn't compile with -fms-compatibility, I
suppose.

- David



More information about the cfe-commits mailing list