[cfe-commits] r127933 - /cfe/trunk/lib/Frontend/InitPreprocessor.cpp

Daniel Dunbar daniel at zuster.org
Fri Mar 18 18:04:12 PDT 2011


Author: ddunbar
Date: Fri Mar 18 20:04:12 2011
New Revision: 127933

URL: http://llvm.org/viewvc/llvm-project?rev=127933&view=rev
Log:
Preprocessor: Don't define __STDC__ in -traditional-cpp mode.

Modified:
    cfe/trunk/lib/Frontend/InitPreprocessor.cpp

Modified: cfe/trunk/lib/Frontend/InitPreprocessor.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/InitPreprocessor.cpp?rev=127933&r1=127932&r2=127933&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/InitPreprocessor.cpp (original)
+++ cfe/trunk/lib/Frontend/InitPreprocessor.cpp Fri Mar 18 20:04:12 2011
@@ -253,7 +253,7 @@
 
   // These should all be defined in the preprocessor according to the
   // current language configuration.
-  if (!LangOpts.Microsoft)
+  if (!LangOpts.Microsoft && !LangOpts.TraditionalCPP)
     Builder.defineMacro("__STDC__");
   if (LangOpts.AsmPreprocessor)
     Builder.defineMacro("__ASSEMBLER__");





More information about the cfe-commits mailing list