https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78512
Nick Desaulniers <ndesaulniers at google dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ndesaulniers at google dot com --- Comment #10 from Nick Desaulniers <ndesaulniers at google dot com> --- I'm not super happy that GCC has false-negatives when %p is encountered. Bugs do exist outside of the Linux kernel with the usage of %p that could be flagged. Clang-18 has recently added -Wno-format-overflow-non-kprintf and -Wformat-truncation-non-kprintf to emulate this behavior in https://github.com/llvm/llvm-project/pull/65969, which we will use in the kernel https://github.com/ClangBuiltLinux/linux/issues/1923#issuecomment-1718144462. At the least, I think this behavior wrt. %p should either be documented, or -Wno-format-overflow-non-kprintf and -Wformat-truncation-non-kprintf implemented in GCC. That said, this diagnostic catches real bugs! Linus turned them off, but we will work through fixing the instances identified towards the goal of getting them re-enabled for the Linux kernel. https://github.com/KSPP/linux/issues/343