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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:cc01cd9397fe99e707bcc5b98bb33d807ba610d7

commit r12-6779-gcc01cd9397fe99e707bcc5b98bb33d807ba610d7
Author: Jason Merrill <ja...@redhat.com>
Date:   Thu Jan 20 09:18:45 2022 -0500

    c++: designator for base class member [PR101405]

    A C++20 designator must name a direct non-static member of the class; in
    this case it names a member of a base class, and we should give an error
    instead of crashing.

            PR c++/101405

    gcc/cp/ChangeLog:

            * decl.cc (reshape_init_class): Reject designator for a member of
            another class.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp2a/desig20.C: New test.

Reply via email to