PR tree-optimization/81303
[official-gcc.git] / gcc / testsuite / gcc.dg / format / ms-format3.c
blob806ddb60b65189a83a847878d1e5fd69c6f8a217
1 /* Test for printf formats. Formats using extensions to the standard
2 should be rejected in strict pedantic mode. But allowed by -Wno-pedantic-ms-format.
3 */
4 /* Tests for specific MS types, origin: Ozkan Sezer <sezeroz@gmail.com> */
5 /* { dg-do compile { target { *-*-mingw* } } } */
6 /* { dg-options "-std=iso9899:1999 -pedantic -Wformat -Wno-pedantic-ms-format" } */
8 #define USE_SYSTEM_FORMATS
9 #define WIN32_LEAN_AND_MEAN
10 #include "format.h"
11 #include <windows.h>
13 void foo (LONG_PTR l, ULONG_PTR u, DWORD_PTR d, UINT_PTR p, SIZE_T s)
15 printf ("%Id\n", l);
16 printf ("%Iu\n", u);
17 printf ("%Iu\n", d);
18 printf ("%Iu\n", p);
19 printf ("%Iu\n", s);