Index: cp/decl2.c
===================================================================
--- cp/decl2.c	(revision 196095)
+++ cp/decl2.c	(working copy)
@@ -1028,7 +1028,7 @@ grokbitfield (const cp_declarator *declarator,
   if (TREE_CODE (value) == VOID_TYPE)
     return void_type_node;
 
-  if (!INTEGRAL_OR_UNSCOPED_ENUMERATION_TYPE_P (TREE_TYPE (value))
+  if (!INTEGRAL_OR_ENUMERATION_TYPE_P (TREE_TYPE (value))
       && (POINTER_TYPE_P (value)
           || !dependent_type_p (TREE_TYPE (value))))
     {
Index: testsuite/g++.dg/cpp0x/enum23.C
===================================================================
--- testsuite/g++.dg/cpp0x/enum23.C	(revision 0)
+++ testsuite/g++.dg/cpp0x/enum23.C	(working copy)
@@ -0,0 +1,9 @@
+// PR c++/51242
+// { dg-do compile { target c++11 } }
+
+enum class MyEnum { A = 1 };
+
+struct MyClass
+{
+  MyEnum Field1 : 3; // { dg-bogus "warning: 'MyClass::Field1' is too small" "" { xfail *-*-* } }
+};
