[Bug c++/123611] [reflection] bogus consteval-only expressions are only allowed in a constant-evaluated context
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Feb 22 16:02:18 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123611
--- Comment #12 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #11)
> Though even that change doesn't fix the #c0 testcase nor its variant without
> expansion stmt.
Yeah, in_consteval_if_p uses scope_chain, but since we (in #c0) did
push_to_top_level, in_consteval_if_p has been cleared.
We should not complain while processing a metafunction, which would also fix
bug 123662. We need some kind of processing_metafunction_p predicate.
Poking...
More information about the Gcc-bugs
mailing list