[Bug c++/125819] [reflection] don't include built-ins in members_of
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jul 2 17:05:11 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125819
--- 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:8ee8f2beab432c57a5b68b8816910c985c8e9356
commit r17-2096-g8ee8f2beab432c57a5b68b8816910c985c8e9356
Author: Marek Polacek <polacek@redhat.com>
Date: Thu Jun 18 15:08:00 2026 -0400
c++/reflection: members_of: skip built-ins [PR125819]
Currently, we include all the built-ins like __builtin_fdimf32x in
the result of members_of. We probably should skip them. This patch
uses DECL_IS_UNDECLARED_BUILTIN so that we skip __builtin_abs but
include abs.
On ^^:: this reduces the # of elements from 2591 to 651.
PR c++/125819
gcc/cp/ChangeLog:
* reflect.cc (namespace_members_of): Skip
DECL_IS_UNDECLARED_BUILTIN decls.
gcc/testsuite/ChangeLog:
* g++.dg/reflect/members_of17.C: New test.
Reviewed-by: Jason Merrill <jason@redhat.com>
More information about the Gcc-bugs
mailing list