From d956fcac86d51ae684da3aeca75587c638b28d5b Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 22 Jul 2007 22:11:35 +0000 Subject: GCC doesn't set __STDC_VERSION__ usually. It never sets it in C++ mode, even gnu C++ mode. llvm-svn: 40408 --- clang/Driver/clang.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'clang/Driver/clang.cpp') 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"); -- cgit v1.2.3