diff options
| author | Boris Staletic <boris.staletic@protonmail.com> | 2026-02-11 16:20:49 +0900 |
|---|---|---|
| committer | Jason Merrill <jason@redhat.com> | 2026-02-11 16:20:49 +0900 |
| commit | a1e81f838a38e37d7a659406f8fea1dba8f26406 (patch) | |
| tree | 3dc877bf437e68918b106a320650ed16482bc2be /libstdc++-v3/include/c_std/csetjmp | |
| parent | 1cd5aaf462ed6096363a45c608115d02a921aafd (diff) | |
| download | gcc-master.zip gcc-master.tar.gz gcc-master.tar.bz2 | |
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 'libstdc++-v3/include/c_std/csetjmp')
0 files changed, 0 insertions, 0 deletions
