https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84919
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Not aware of any right now, but 1) if the format string is not compile time known, we don't know if it is %p or not 2) the format string parsing is done in other passes (-Wformat code in FEs, and gimple-ssa-sprintf.c) compared to the restrict warning.