Fix broken MinGW build of gcc.c
[official-gcc.git] / gcc / testsuite / g++.dg / warn / warn_format_signedness.C
blob473d522c8a678f9bdaea136fffdab4303ce2ed37
1 /* { dg-do compile }  */
2 /* { dg-options "-Wformat -Wformat-signedness" }  */
4 /* PR c/60194  */
6 void foo(unsigned u, int i, unsigned char uc, signed char sc) {
7   __builtin_printf("%d\n", u);  /* { dg-warning "expects argument of type 'int', but argument 2 has type 'unsigned int'" } */
8   __builtin_printf("%u\n", i);  /* { dg-warning "expects argument of type 'unsigned int', but argument 2 has type 'int'" } */
9   __builtin_printf("%c\n", sc);
10   __builtin_printf("%c\n", uc);