c-family: Support format checking C2X %b, %B formats
[official-gcc.git] / gcc / testsuite / gcc.dg / format / c11-printf-1.c
blob7b8a9928098e75b3b7d54ce3b17085c2c54d9d98
1 /* Test for printf formats: rejection of C2X (and C2X-recommended) formats in
2 pedantic mode. */
3 /* { dg-do compile } */
4 /* { dg-options "-std=c11 -pedantic -Wformat" } */
6 #include "format.h"
8 void
9 foo (int i)
11 printf ("%b", i); /* { dg-warning "C" } */
12 printf ("%B", i); /* { dg-warning "C" } */