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

--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Jason Merrill <[email protected]>:

https://gcc.gnu.org/g:403ffd5d11ccaa5cf68d0220c4b2b793b6b7d3f7

commit r16-7625-g403ffd5d11ccaa5cf68d0220c4b2b793b6b7d3f7
Author: Valentyn Yukhymenko <[email protected]>
Date:   Fri Feb 20 16:31:36 2026 +0000

    c++/reflection: anon union member from splice [PR123642]

    Fixes a bogus "'Cls::<unnamed union>' is not a base of 'const Cls'" error
    when user tries to do a class member lookup using splice with reflection of
    anon union member.

            PR c++/123642

    gcc/cp/ChangeLog:

            * typeck.cc (finish_class_member_access_expr): Change context
lookup
            to handle anon union members.

    gcc/testsuite/ChangeLog:

            * g++.dg/reflect/member4.C: Remove expected error.
            * g++.dg/reflect/anon4.C: New test based on original bug report.

    Signed-off-by: Valentyn Yukhymenko <[email protected]>

Reply via email to