https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88270

--- Comment #1 from Eric Blake <eblake at redhat dot com> ---
Note that gcc -Wformat DOES flag things like printf("%B"), %m is the only
special-case where it is not flagged even on systems where it does not work,
and where we'd want fine-tuned control over whether a particular function
should flag it.

$ cat foo.c
#include <stdio.h>
int main (void) {
printf("%m %B\n");
return 0;
}
$ gcc -Wformat foo.c -o foo 
foo.c: In function ‘main’:
foo.c:3:13: warning: unknown conversion type character ‘B’ in format
[-Wformat=]
 printf("%m %B\n");
             ^
$ ./foo # on Linux
Success %B
$ ./foo # on BSD
m B

Reply via email to