https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127387
Bug ID: 127387
Summary: taking the address of consteval function not detected
in comma op
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: mpolacek at gcc dot gnu.org
Target Milestone: ---
```
consteval int foo () { return 42; }
void
g ()
{
int i = (&foo, 42);
}
```
compiles correctly but we should say "cannot take address of consteval function
'foo' outside of an immediate invocation".
This came up in
<https://gcc.gnu.org/pipermail/gcc-patches/2026-September/729943.html>.