2017-05-12 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/49604
* g++.dg/cpp0x/forw_enum14.C: New.
* g++.dg/cpp0x/forw_enum15.C: Likewise.
From-SVN: r247969
+2017-05-12 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/49604
+ * g++.dg/cpp0x/forw_enum14.C: New.
+ * g++.dg/cpp0x/forw_enum15.C: Likewise.
+
2017-05-12 Richard Biener <rguenther@suse.de>
* g++.dg/tree-ssa/ssa-dse-2.C: Adjust.
--- /dev/null
+// PR c++/49604
+// { dg-do compile { target c++11 } }
+
+class MyTable {
+public:
+ enum Constants : unsigned;
+};
+
+enum MyTable::Constants : unsigned {
+ LENGTH = 12,
+};
+
+int main()
+{
+ return MyTable::LENGTH;
+}
--- /dev/null
+// PR c++/49604
+// { dg-do compile { target c++11 } }
+
+struct Foo
+{
+private:
+ int val;
+ enum impl_t : int;
+public:
+ Foo(impl_t v) : val(v) {}
+};
+enum Foo::impl_t : int { X };
+
+Foo test = Foo::X; // { dg-error "private" }