http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56235
Bug #: 56235 Summary: [4.8 regression] Bogus "error: invalid conversion from ‘unsigned char’ to ‘B::Mode’ [-fpermissive]" Classification: Unclassified Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: ppluzhni...@google.com Test case: struct A { A (const A &); }; struct B { A a; enum Mode { }; Mode m:8; }; struct C { C(); B b; }; C fn() { return C(); } The test compiles fine with 4.7, fails with 4.8 (20130205 (experimental)) but only in C++11 mode: g++ -c -std=c++11 t.ii t.ii: In constructor ‘B::B(B&&)’: t.ii:6:8: error: invalid conversion from ‘unsigned char’ to ‘B::Mode’ [-fpermissive] struct B ^ t.ii: In constructor ‘C::C(C&&)’: t.ii:13:8: note: synthesized method ‘B::B(B&&)’ first required here struct C ^ t.ii: In function ‘C fn()’: t.ii:21:14: note: synthesized method ‘C::C(C&&)’ first required here return C(); ^ Google ref: b/8152830