2018-01-24 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / format / ms-format1.c
blobe8f739dce35ff064445ce0aaa017d35f4db8a9c2
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" } */
8 #define USE_SYSTEM_FORMATS
9 #include "format.h"
11 enum en1 { A=0, B=1 };
12 typedef enum { _A=0, _B=1 } en2;
14 void
15 foo (int i, long l, long long ll, size_t z, enum en1 e1, en2 e2)
17 printf ("%I32d", i);
18 printf ("%I32d", l);
19 printf ("%I32d", e1);
20 printf ("%I32d", e2);
21 printf ("%I64x", ll);
22 printf ("%Ix", z);