[Bug c++/102050] Nonempty list-initialization rejects constructor with defaulted std::initializer_list

2021-12-22 Thread ppalka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102050

Patrick Palka  changed:

   What|Removed |Added

 CC||ppluzhnikov at google dot com

--- Comment #3 from Patrick Palka  ---
*** Bug 60437 has been marked as a duplicate of this bug. ***

[Bug c++/102050] Nonempty list-initialization rejects constructor with defaulted std::initializer_list

2021-09-15 Thread ppalka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102050

Patrick Palka  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|ASSIGNED|RESOLVED

--- Comment #2 from Patrick Palka  ---
Fixed for GCC 12.

[Bug c++/102050] Nonempty list-initialization rejects constructor with defaulted std::initializer_list

2021-09-15 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102050

--- Comment #1 from CVS Commits  ---
The master branch has been updated by Patrick Palka :

https://gcc.gnu.org/g:2ab5c3d5457f0d480c6423ee7ac52ce1f98592c9

commit r12-3555-g2ab5c3d5457f0d480c6423ee7ac52ce1f98592c9
Author: Patrick Palka 
Date:   Wed Sep 15 13:54:53 2021 -0400

c++: default ctor that's also a list ctor [PR102050]

In grok_special_member_properties we need to set TYPE_HAS_COPY_CTOR,
TYPE_HAS_DEFAULT_CONSTRUCTOR and TYPE_HAS_LIST_CTOR independently
from each other because a constructor can be both a default and list
constructor (as in the first testcase), or both a default and copy
constructor (as in the second testcase).

PR c++/102050

gcc/cp/ChangeLog:

* decl.c (grok_special_member_properties): Set
TYPE_HAS_COPY_CTOR, TYPE_HAS_DEFAULT_CONSTRUCTOR
and TYPE_HAS_LIST_CTOR independently from each other.

gcc/testsuite/ChangeLog:

* g++.dg/cpp0x/initlist125.C: New test.
* g++.dg/cpp0x/initlist126.C: New test.

[Bug c++/102050] Nonempty list-initialization rejects constructor with defaulted std::initializer_list

2021-09-14 Thread ppalka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102050

Patrick Palka  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Target Milestone|--- |12.0
   Assignee|unassigned at gcc dot gnu.org  |ppalka at gcc dot 
gnu.org
 CC||ppalka at gcc dot gnu.org
   Last reconfirmed||2021-09-14
 Ever confirmed|0   |1