Index: include/clang/Basic/DiagnosticSemaKinds.td
===================================================================
--- include/clang/Basic/DiagnosticSemaKinds.td	(revision 116193)
+++ include/clang/Basic/DiagnosticSemaKinds.td	(working copy)
@@ -832,6 +832,9 @@
   "non-integral type %0 is an invalid underlying type">;
 def err_enumerator_too_large : Error<
   "enumerator value is not representable in the underlying type %0">;
+def ext_enumerator_too_large : ExtWarn<
+  "enumerator value is not representable in the underlying type %0">,
+  InGroup<Microsoft>;
 def err_enumerator_wrapped : Error<
   "enumerator value %0 is not representable in the underlying type %1">;
 def err_enum_redeclare_type_mismatch : Error<
Index: lib/Sema/SemaDecl.cpp
===================================================================
--- lib/Sema/SemaDecl.cpp	(revision 116193)
+++ lib/Sema/SemaDecl.cpp	(working copy)
@@ -5422,7 +5422,9 @@
         // Recover by falling back to int.
         EnumUnderlying = Context.IntTy.getTypePtr();
       }
-    }
+    } else if (getLangOptions().Microsoft)
+      // Microsoft enums are always of int type.
+      EnumUnderlying = Context.IntTy.getTypePtr();
   }
 
   DeclContext *SearchDC = CurContext;
@@ -6974,10 +6976,14 @@
           // C++0x [dcl.enum]p5:
           //   ... if the initializing value of an enumerator cannot be
           //   represented by the underlying type, the program is ill-formed.
-          if (!isRepresentableIntegerValue(Context, EnumVal, EltTy))
-            Diag(IdLoc, diag::err_enumerator_too_large)
-              << EltTy;
-          else
+          if (!isRepresentableIntegerValue(Context, EnumVal, EltTy)) {
+            if (getLangOptions().Microsoft) {
+              Diag(IdLoc, diag::ext_enumerator_too_large) << EltTy;
+              ImpCastExprToType(Val, EltTy, CK_IntegralCast);
+            } else 
+              Diag(IdLoc, diag::err_enumerator_too_large)
+                << EltTy;
+          } else
             ImpCastExprToType(Val, EltTy, CK_IntegralCast);
         }
         else {
Index: test/Sema/MicrosoftExtensions.c
===================================================================
--- test/Sema/MicrosoftExtensions.c	(revision 116193)
+++ test/Sema/MicrosoftExtensions.c	(working copy)
@@ -19,3 +19,15 @@
    int l;
    int D[];
 };
+
+
+enum ENUM1; // expected-warning {{forward references to 'enum' types are a Microsoft extension}}    
+enum ENUM1 var1 = 3;
+enum ENUM1* var2 = 0;
+
+
+enum ENUM2 {
+	ENUM2_a = (enum ENUM2) 4,
+	ENUM2_b = 0x9FFFFFFF, // expected-warning {{enumerator value is not representable in the underlying type 'int'}}
+	ENUM2_c = 0x100000000 // expected-warning {{enumerator value is not representable in the underlying type 'int'}}
+};
Index: test/SemaCXX/MicrosoftExtensions.cpp
===================================================================
--- test/SemaCXX/MicrosoftExtensions.cpp	(revision 116193)
+++ test/SemaCXX/MicrosoftExtensions.cpp	(working copy)
@@ -87,4 +87,13 @@
 
 //MSVC allows forward enum declaration
 enum ENUM; // expected-warning {{forward references to 'enum' types are a Microsoft extension}}
-ENUM *var;     
+ENUM *var = 0;     
+ENUM var2 = (ENUM)3;
+enum ENUM1* var3 = 0;// expected-warning {{forward references to 'enum' types are a Microsoft extension}}
+
+
+enum ENUM2 {
+	ENUM2_a = (enum ENUM2) 4,
+	ENUM2_b = 0x9FFFFFFF, // expected-warning {{enumerator value is not representable in the underlying type 'int'}}
+	ENUM2_c = 0x100000000 // expected-warning {{enumerator value is not representable in the underlying type 'int'}}
+};
