GCC doesn't set __STDC_VERSION__ usually.  It never sets it in
C++ mode, even gnu C++ mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40408 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/clang.cpp b/Driver/clang.cpp
index 6016b9a..7d8a459 100644
--- a/Driver/clang.cpp
+++ b/Driver/clang.cpp
@@ -391,9 +391,9 @@
   // 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");