]> granicus.if.org Git - clang/commitdiff
Do not define __STRICT_ANSI__ in clang-cl
authorEhsan Akhgari <ehsan.akhgari@gmail.com>
Mon, 30 Jun 2014 20:36:33 +0000 (20:36 +0000)
committerEhsan Akhgari <ehsan.akhgari@gmail.com>
Mon, 30 Jun 2014 20:36:33 +0000 (20:36 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212066 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Frontend/InitPreprocessor.cpp
test/Preprocessor/predefined-macros.c

index 8aa96d8ab9f23c46f99e797a3732ae9c78ac4f87..770993956f789d8036a3a746067234ff6f47c964 100644 (file)
@@ -478,7 +478,7 @@ static void InitializePredefinedMacros(const TargetInfo &TI,
   // Initialize language-specific preprocessor defines.
 
   // Standard conforming mode?
-  if (!LangOpts.GNUMode)
+  if (!LangOpts.GNUMode && !LangOpts.MSVCCompat)
     Builder.defineMacro("__STRICT_ANSI__");
 
   if (LangOpts.CPlusPlus11)
index 34de794a47cf7a292e4a0bee735e352655b96b7d..3e0b8a030752763838299fc134832d44aad7e582 100644 (file)
@@ -9,6 +9,7 @@
 // CHECK-MS: #define _M_IX86_FP
 // CHECK-MS: #define _WIN32 1
 // CHECK-MS-NOT: #define __GNUC__
+// CHECK-MS-NOT: #define __STRICT_ANSI__
 //
 // RUN: %clang_cc1 %s -E -dM -triple i686-pc-win32 -fms-compatibility \
 // RUN:     -o - | FileCheck %s --check-prefix=CHECK-MS-STDINT