From: Daniel Dunbar Date: Sat, 19 Mar 2011 01:04:12 +0000 (+0000) Subject: Preprocessor: Don't define __STDC__ in -traditional-cpp mode. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=47226350c4f8094cf2ebe750351b2b3242709584;p=clang Preprocessor: Don't define __STDC__ in -traditional-cpp mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127933 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Frontend/InitPreprocessor.cpp b/lib/Frontend/InitPreprocessor.cpp index d9a2ef66b9..3c5be253c7 100644 --- a/lib/Frontend/InitPreprocessor.cpp +++ b/lib/Frontend/InitPreprocessor.cpp @@ -253,7 +253,7 @@ static void InitializePredefinedMacros(const TargetInfo &TI, // 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__");