http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53794
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |accepts-invalid Status|UNCONFIRMED |NEW Last reconfirmed| |2012-06-28 Summary|[c++11, accepts invalid] |[c++11] dangling reference |dangling reference accepted |accepted in nested |in nested structures with |structures with initializer |initializer lists |lists Ever Confirmed|0 |1 --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-06-28 13:13:13 UTC --- You get a warning with -Wmissing-field-initializers (or -Wextra) but it should be rejected. The implicity-declared default constructor for A should be defined as deleted. [class.ctor]/5 If there is no user-declared constructor for class X, a constructor having no parameters is implicitly declared as defaulted (8.4). [...] A defaulted default constructor for class X is defined as deleted if: — [...] — any non-static data member with no brace-or-equal-initializer is of reference type,