https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113298
--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> --- GCC trunk now lets us associate permerrors with a -W flag, so this would be pretty trivial to do. It's a matter of adding an option to c-family/c.opt and doc/invoke.texi and changing the relevant permerror call to permerror_opt.