]> granicus.if.org Git - clang/commitdiff
Don't define __STDC__ when compiling with -fms-extensions
authorSteve Naroff <snaroff@apple.com>
Thu, 18 Dec 2008 22:37:25 +0000 (22:37 +0000)
committerSteve Naroff <snaroff@apple.com>
Thu, 18 Dec 2008 22:37:25 +0000 (22:37 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61223 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Lex/Preprocessor.cpp

index 3fa76fa1615abdaceec3d7574fdd7b4db42a944a..7800fb5189449d2cae53a9ebbc5a766ce4102b11 100644 (file)
@@ -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)