https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118323
Barry Revzin <barry.revzin at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |barry.revzin at gmail dot com --- Comment #2 from Barry Revzin <barry.revzin at gmail dot com> --- Yeah I think I made this a little more difficult on the compiler, sorry. We used to have this rule that calling a consteval function outside of an immediate function context had to be a constant. If it wasn't, you diagnose there. Now it can escalate to make the enclosing function consteval. Which if it cannot become consteval (as in Jonathan's example), the wording of the rule right now is that the problem is that func cannot be made consteval - not that the call to check isn't a constant. I don't know if there needs to be wording changes in the standard here to help. But I think the right approach for a diagnostic here is to always point to the direct consteval function call that started the escalation, not the enclosing function that couldn't be escalated?