[cfe-commits] r61223 - /cfe/trunk/lib/Lex/Preprocessor.cpp

Steve Naroff snaroff at apple.com
Thu Dec 18 14:37:28 PST 2008


Author: snaroff
Date: Thu Dec 18 16:37:25 2008
New Revision: 61223

URL: http://llvm.org/viewvc/llvm-project?rev=61223&view=rev
Log:
Don't define __STDC__ when compiling with -fms-extensions

Modified:
    cfe/trunk/lib/Lex/Preprocessor.cpp

Modified: cfe/trunk/lib/Lex/Preprocessor.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/Preprocessor.cpp?rev=61223&r1=61222&r2=61223&view=diff

==============================================================================
--- cfe/trunk/lib/Lex/Preprocessor.cpp (original)
+++ cfe/trunk/lib/Lex/Preprocessor.cpp Thu Dec 18 16:37:25 2008
@@ -430,7 +430,8 @@
   // 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)





More information about the cfe-commits mailing list