https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115580
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2024-06-21 Status|UNCONFIRMED |NEW Target Milestone|--- |11.5 Summary|[11/12/13/14/15 regression] |[11/12/13/14/15 regression] |decltype of nullptr error |null pointer warning from |with -Werror=nonnull |an unevaluated context Ever confirmed|0 |1 Known to fail| |11.1.0 Known to work| |10.1.0 --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- The this pointer case was introduced by r11-6900-gd6f1cf644c45b7 (and ) BUT this has always been an issue: ``` int f(void*) __attribute__((nonnull)); void g() { decltype(f(nullptr)) b; } ``` This should not warn since we are inside an unevaluated context.