[Bug c++/123641] [reflection] members_of and friend class
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Feb 23 14:50:40 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123641
--- Comment #1 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Marek Polacek <mpolacek@gcc.gnu.org>:
https://gcc.gnu.org/g:23a80bd08ffaaf2260a499d828d63d001e1d634c
commit r16-7648-g23a80bd08ffaaf2260a499d828d63d001e1d634c
Author: Marek Polacek <polacek@redhat.com>
Date: Thu Feb 19 14:47:26 2026 -0500
c++/reflection: members_of and friend class [PR123641]
The assert in this test currently doesn't pass because .size () is 3, due
to
{A, B, B} found in N, but it should only be {A, B}, because we should
skip the hidden "void N::B()".
PR c++/123641
gcc/cp/ChangeLog:
* name-lookup.cc: Move STAT_* and MAYBE_STAT_* macros from here
to...
* name-lookup.h: ...here.
* reflect.cc (namespace_members_of): Use them. Skip
STAT_TYPE_HIDDEN_P.
gcc/testsuite/ChangeLog:
* g++.dg/reflect/members_of8.C: New test.
Reviewed-by: Jason Merrill <jason@redhat.com>
More information about the Gcc-bugs
mailing list