https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88270
--- Comment #2 from joseph at codesourcery dot com <joseph at codesourcery dot com> --- The -Wformat -Wpedantic comment should warn for nonstandard formats - but would do so for all format functions, not a subset. And while we have separate printf and gnu_printf arguments you can pass to the format attribute, we don't have iso_printf, and we don't have anything that means "gnu_printf without -Wpedantic warnings" either. So there are some related features, but nothing that does exactly what you want. "printf" in a format attribute is meant to mean what's accepted by the system's C library. So it would be appropriate for the GCC port to whatever BSD system to arrange for "printf" format checking to know that %m is not supported on that system, much like it does for MinGW (while a function with gnu_printf would be expected to accept all GNU formats - of course still not quite correct for your use case if it really accepts just %m plus the system printf formats).