| 1 |
/* PR c/65040 */ |
| 2 |
/* { dg-do compile } */ |
| 3 |
/* { dg-options "-Wformat -Wformat-signedness" } */ |
| 4 |
|
| 5 |
unsigned char uc; |
| 6 |
signed char sc; |
| 7 |
unsigned short us; |
| 8 |
signed short ss; |
| 9 |
unsigned int u; |
| 10 |
int i; |
| 11 |
|
| 12 |
void |
| 13 |
foo (void) |
| 14 |
{ |
| 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" } */ |
| 21 |
} |