[Bug c++/86464] Delegating constructor causes error if parameter has same name as class

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jul 10 20:49:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86464

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2018-07-10
     Ever confirmed|0                           |1

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
EDG accepts it but Clang also rejects it:

del.cc:5:11: error: member initializer 'foo' does not name a non-static data
member or base class
        : foo{ foo }
          ^~~~~~~~~~

But I think the code is valid according to [class.base.init] p2.


More information about the Gcc-bugs mailing list