PR debug/66535
[official-gcc.git] / gcc / testsuite / c-c++-common / pr65040.c
blob80da8f916485171f2e619241ccf6d238dda0f48b
1 /* PR c/65040 */
2 /* { dg-do compile } */
3 /* { dg-options "-Wformat -Wformat-signedness" } */
5 unsigned char uc;
6 signed char sc;
7 unsigned short us;
8 signed short ss;
9 unsigned int u;
10 int i;
12 void
13 foo (void)
15 __builtin_printf ("%u\n", uc); /* { dg-bogus "expects argument of type" } */
16 __builtin_printf ("%u\n", sc); /* { dg-warning "expects argument of type" } */
17 __builtin_printf ("%u\n", us); /* { dg-bogus "expects argument of type" } */
18 __builtin_printf ("%u\n", ss); /* { dg-warning "expects argument of type" } */
19 __builtin_printf ("%u\n", u); /* { dg-bogus "expects argument of type" } */
20 __builtin_printf ("%u\n", i); /* { dg-warning "expects argument of type" } */