2013-10-17 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / format / ms_unnamed-1.c
blobac1294282908e7f079273a6e591e0a82730446ab
1 /* Test for warnings with possibly unnamed integer types. Bug 24329. */
2 /* Origin: Joseph Myers <joseph@codesourcery.com> */
3 /* { dg-do compile { target { *-*-mingw* } } } */
4 /* { dg-options "-Wformat" } */
5 /* { dg-options "-Wformat -msse" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
6 /* { dg-require-effective-target sse { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
8 #define USE_SYSTEM_FORMATS
9 #include "format.h"
11 /* Definition of TItype follows same logic as in gcc.dg/titype-1.c,
12 but must be a #define to avoid giving the type a name. */
13 #if (defined(__LP64__) && !defined(__hppa__)) || defined(__SPU__)
14 #define TItype int __attribute__ ((mode (TI)))
15 #else
16 #define TItype long
17 #endif
19 void
20 f (TItype x)
22 printf("%d", x); /* { dg-warning "expects argument" } */
23 printf("%d", 141592653589793238462643383279502884197169399375105820974944); /* { dg-warning "expects argument" } */
24 /* { dg-warning "unsigned only|too large" "constant" { target *-*-* } 23 } */