Index: lib/Frontend/InitPreprocessor.cpp =================================================================== --- lib/Frontend/InitPreprocessor.cpp +++ lib/Frontend/InitPreprocessor.cpp @@ -491,7 +491,7 @@ Builder.defineMacro("__BLOCKS__"); } - if (LangOpts.CXXExceptions) + if (!LangOpts.MSVCCompat && LangOpts.CXXExceptions) Builder.defineMacro("__EXCEPTIONS"); if (LangOpts.RTTI) Builder.defineMacro("__GXX_RTTI"); Index: test/Frontend/exceptions.c =================================================================== --- /dev/null +++ test/Frontend/exceptions.c @@ -0,0 +1,6 @@ +// RUN: %clang_cc1 -x cl %s +// expected-no-diagnostics + +#if defined(__EXCEPTIONS) +#error __EXCEPTIONS should not be defined. +#endif