summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-07-22 22:11:35 +0000
committerChris Lattner <sabre@nondot.org>2007-07-22 22:11:35 +0000
commitd956fcac86d51ae684da3aeca75587c638b28d5b (patch)
treeeec0598228586a7591de98bc6d5edda230980b14
parentafb1d31c54204b7f6c11e4f8815d203bcf9cffa3 (diff)
downloadbcm5719-llvm-d956fcac86d51ae684da3aeca75587c638b28d5b.tar.gz
bcm5719-llvm-d956fcac86d51ae684da3aeca75587c638b28d5b.zip
GCC doesn't set __STDC_VERSION__ usually. It never sets it in
C++ mode, even gnu C++ mode. llvm-svn: 40408
-rw-r--r--clang/Driver/clang.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/Driver/clang.cpp b/clang/Driver/clang.cpp
index 6016b9a50af..7d8a4590f12 100644
--- a/clang/Driver/clang.cpp
+++ b/clang/Driver/clang.cpp
@@ -391,9 +391,9 @@ static void InitializePredefinedMacros(Preprocessor &PP,
// current language configuration.
DefineBuiltinMacro(Buf, "__STDC__=1");
//DefineBuiltinMacro(Buf, "__ASSEMBLER__=1");
- if (PP.getLangOptions().C99)
+ if (PP.getLangOptions().C99 && !PP.getLangOptions().CPlusPlus)
DefineBuiltinMacro(Buf, "__STDC_VERSION__=199901L");
- else
+ else if (0) // STDC94 ?
DefineBuiltinMacro(Buf, "__STDC_VERSION__=199409L");
DefineBuiltinMacro(Buf, "__STDC_HOSTED__=1");
OpenPOWER on IntegriCloud