https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100546
David Malcolm <dmalcolm at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Last reconfirmed| |2021-05-18 Status|UNCONFIRMED |ASSIGNED --- Comment #1 from David Malcolm <dmalcolm at gcc dot gnu.org> --- The "noreturn"-ness of the function pointer is affected by attributes. Hence if you add the attribute to the function pointer type, the warning goes away: void (*noReturnPtr)(const char *str) __attribute__((noreturn)) = &noReturn; That said, given that we're in "main", the analyzer ought to figure out that noReturnPtr can't have been changed by the point of the call, and for some reason it's not doing that; am investigating.