From 1ef21279b65f2380dc73bb27860c9b026a0f8350 Mon Sep 17 00:00:00 2001 From: Steve Naroff Date: Thu, 18 Dec 2008 22:37:25 +0000 Subject: Don't define __STDC__ when compiling with -fms-extensions llvm-svn: 61223 --- clang/lib/Lex/Preprocessor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/lib/Lex/Preprocessor.cpp') diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp index 3fa76fa1615..7800fb51894 100644 --- a/clang/lib/Lex/Preprocessor.cpp +++ b/clang/lib/Lex/Preprocessor.cpp @@ -430,7 +430,8 @@ static void InitializePredefinedMacros(Preprocessor &PP, // and __DATE__ etc. // These should all be defined in the preprocessor according to the // current language configuration. - DefineBuiltinMacro(Buf, "__STDC__=1"); + if (!PP.getLangOptions().Microsoft) + DefineBuiltinMacro(Buf, "__STDC__=1"); if (PP.getLangOptions().AsmPreprocessor) DefineBuiltinMacro(Buf, "__ASSEMBLER__=1"); if (PP.getLangOptions().C99 && !PP.getLangOptions().CPlusPlus) -- cgit v1.2.3