Define __STDC__ in -fms-extensions mode; defining it is consistent with gcc, and not defining it causes the system headers on multiple platforms to break with -fms-extensions because they assume the lack of a definition of __STDC__ implies a traditional (pre-ANSI) preprocessor. PR10324 and <rdar://problem/10313809> .

llvm-svn: 142554
This commit is contained in:
Eli Friedman 2011-10-19 23:46:05 +00:00
parent 30d15445ed
commit 7bba3ef862
1 changed files with 1 additions and 1 deletions

View File

@ -278,7 +278,7 @@ static void InitializeStandardPredefinedMacros(const TargetInfo &TI,
const LangOptions &LangOpts,
const FrontendOptions &FEOpts,
MacroBuilder &Builder) {
if (!LangOpts.MicrosoftExt && !LangOpts.TraditionalCPP)
if (!LangOpts.MicrosoftMode && !LangOpts.TraditionalCPP)
Builder.defineMacro("__STDC__");
if (LangOpts.Freestanding)
Builder.defineMacro("__STDC_HOSTED__", "0");