aboutsummaryrefslogtreecommitdiff
path: root/libjava/classpath/java/lang
diff options
context:
space:
mode:
authorBoris Staletic <boris.staletic@protonmail.com>2026-02-11 16:20:49 +0900
committerJason Merrill <jason@redhat.com>2026-02-11 16:20:49 +0900
commita1e81f838a38e37d7a659406f8fea1dba8f26406 (patch)
tree3dc877bf437e68918b106a320650ed16482bc2be /libjava/classpath/java/lang
parent1cd5aaf462ed6096363a45c608115d02a921aafd (diff)
downloadgcc-master.zip
gcc-master.tar.gz
gcc-master.tar.bz2
c++/reflection: Allow address-splicing of non-static members [PR123660, PR123661]HEADtrunkmaster
In case of expressions like `&[:expr:]` where `expr` depends on a template parameter, and the splice expression represents a `FIELD_DECL` or a non-static member `FUNCTION_DECL`, that's exactly what we'd pass on. However, `build_x_unary_op()` for these expressions is expecting an `OFFSET_REF`. `OFFSET_REF` is also what gets passed to `build_x_unary_op()` when templates are not involved. There's also a difference between the template argument being a type and using `members_of()` to get to the reflections of members (in which case evaluating the `SPLICE_EXPR` returns a `FUNCTION_DECL` - `splice10.C` test) and passing `^^T::member` as the template argument (in which case evaluating the `SPLICE_EXPR` returns a `BASELINK` - `splice11.C`). Signed-off-by: Boris Staletic <boris.staletic@protonmail.com> PR c++/123660 PR c++/123661 gcc/cp/ChangeLog: * pt.cc (tsubst_splice_expr): Handle pointers to non-static members from splice expressions gcc/testsuite/ChangeLog: * g++.dg/reflect/splice10.C: New test. * g++.dg/reflect/splice11.C: New test.
Diffstat (limited to 'libjava/classpath/java/lang')
0 files changed, 0 insertions, 0 deletions