This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/51424] [C++11] G++ should diagnose self-delegating constructors
- From: "aschepler at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 09 Apr 2013 19:38:15 +0000
- Subject: [Bug c++/51424] [C++11] G++ should diagnose self-delegating constructors
- Auto-submitted: auto-generated
- References: <bug-51424-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51424
--- Comment #1 from Andrew Schepler <aschepler at gmail dot com> 2013-04-09 19:38:15 UTC ---
The diagnostic is easy in the direct case of delegating to the same
constructor, but difficult in the indirect case of multiple delegating
constructors. (The condition might still be detectable if enough constructors
can be inlined.) This difficulty is presumably why the Standard specifies "no
diagnostic required".
But yes, it seems like a good idea to support a warning for the easy case.