aboutsummaryrefslogtreecommitdiff
path: root/libjava/classpath/gnu/java
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2026-02-01 15:20:55 -0500
committerMarek Polacek <polacek@redhat.com>2026-02-02 09:28:13 -0500
commit9de2f8da0c37f04d67bc3d5dcee6a36034df2f9a (patch)
tree74c767bef1f59d4fde731de8e0fc4c55f8d7c85a /libjava/classpath/gnu/java
parent075aadae398431b23d34dfc7204e297b8676dd59 (diff)
downloadgcc-9de2f8da0c37f04d67bc3d5dcee6a36034df2f9a.zip
gcc-9de2f8da0c37f04d67bc3d5dcee6a36034df2f9a.tar.gz
gcc-9de2f8da0c37f04d67bc3d5dcee6a36034df2f9a.tar.bz2
c++/reflection: wrong error with const meta::info parm [PR123614]
Here we issue a bogus "not a constant expression" error ultimately because get_info returns NULL_TREE for the const parameter in Name. The cxx_eval_constant_expression in get_info produces a NOP_EXPR: (info) reflect_expr <int> which is not REFLECT_EXPR_P. This isn't caught by the REFLECTION_TYPE_P && REFLECT_EXPR_P check in _eval_constant_expression because OP is a NOP_EXPR. The NOP_EXPR comes from adjust_temp_type. I suppose I could just add STRIP_NOPS to get_info. Or I could follow c++/65695 / r6-41-gfb899e32c16088 and adjust cp_fold_convert to fold away the conversion. PR c++/123614 gcc/cp/ChangeLog: * cvt.cc (cp_fold_convert): Avoid wrapping a REFLECT_EXPR in NOP_EXPR. gcc/testsuite/ChangeLog: * g++.dg/reflect/parm5.C: New test. Reviewed-by: Jason Merrill <jason@redhat.com>
Diffstat (limited to 'libjava/classpath/gnu/java')
0 files changed, 0 insertions, 0 deletions