https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53896
Martin Liška <marxin at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |INVALID --- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> --- Well, as I read documentation for the warning, I believe it's very precise: ``` Warn about functions that might be candidates for attributes "pure", "const" or "noreturn". The compiler only warns for functions visible in other compilation units or (in the case of "pure" and "const") if it cannot prove that the function returns normally. ``` That's exactly your case as the compiler can't prove that it does return.