http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51424
Bug #: 51424 Summary: [C++11] G++ should diagnose self-delegating constructors Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: ja...@gcc.gnu.org CC: pedro.lama...@gmail.com, ville.voutilai...@gmail.com This modification of g++.dg/template/meminit1.C should get a diagnostic in C++11 mode as well: template <class T > struct S { S() : S() {} // { dg-message "delegating constructors" "" { target c++98 } } // { dg-error "delegates to itself" "" { target c++11 } } }; S<int> s; because 12.6.2 says, "If a constructor delegates to itself directly or indirectly, the program is ill-formed; no diagnostic is required." The diagnostic is not required, but it is easy to give, so we should do so.