| 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 <[email protected]> */ |
| 5 |
/* { dg-do compile { target { *-*-mingw* } } } */ |
| 6 |
/* { dg-options "-std=iso9899:1999 -pedantic -Wformat -Wno-pedantic-ms-format" } */ |
| 7 |
|
| 8 |
#define USE_SYSTEM_FORMATS |
| 9 |
#define WIN32_LEAN_AND_MEAN |
| 10 |
#include "format.h" |
| 11 |
#include <windows.h> |
| 12 |
|
| 13 |
void foo (LONG_PTR l, ULONG_PTR u, DWORD_PTR d, UINT_PTR p, SIZE_T s) |
| 14 |
{ |
| 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); |
| 20 |
} |