111
|
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 /* Origin: Kai Tietz <kai.tietz@onevision.com> */
|
|
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 #include "format.h"
|
|
10
|
|
11 enum en1 { A=0, B=1 };
|
|
12 typedef enum { _A=0, _B=1 } en2;
|
|
13
|
|
14 void
|
|
15 foo (int i, long l, long long ll, size_t z, enum en1 e1, en2 e2)
|
|
16 {
|
|
17 printf ("%I32d", i);
|
|
18 printf ("%I32d", l);
|
|
19 printf ("%I32d", e1);
|
|
20 printf ("%I32d", e2);
|
|
21 printf ("%I64x", ll);
|
|
22 printf ("%Ix", z);
|
|
23 }
|