[cfe-dev] -fms-extensions/LangOptions::Microsoft

Douglas Gregor dgregor at apple.com
Fri Nov 20 10:53:07 PST 2009


On Nov 20, 2009, at 10:45 AM, John Thompson wrote:

> I see that LangOptions::Microsoft no longer defaults to true in a  
> Visual Studio build, but that it is passed in from the driver.
>
> What is the reason for that?

clang and clang-cc are being merged into a single executable.

> I'm concerned about the implications of the differences in behavior  
> between default compilation of a file with clang vs. clang-cc.
>
> For example, compiling a file that includes stdio.h with clang-cc on  
> Windows will now by default break unless -fms-extensions is used.   
> It will work if compiled with clang.

clang-cc is an implementation detail that users should never call.  
What matters is the behavior that we see with "clang". If it's doing  
the right thing, we're fine.

>
> Thus if I have a test that includes stdio.h and uses clang-cc, I  
> have no way to do it generically because I would ahve to use -fms- 
> extensions to make it work on Windows.

Well, the test could use "clang".

	- Doug



More information about the cfe-dev mailing list