annotate gcc/testsuite/gcc.dg/format/ms-format1.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Test for printf formats. Formats using extensions to the standard
kono
parents:
diff changeset
2 should be rejected in strict pedantic mode. But allowed by -Wno-pedantic-ms-format.
kono
parents:
diff changeset
3 */
kono
parents:
diff changeset
4 /* Origin: Kai Tietz <kai.tietz@onevision.com> */
kono
parents:
diff changeset
5 /* { dg-do compile { target { *-*-mingw* } } } */
kono
parents:
diff changeset
6 /* { dg-options "-std=iso9899:1999 -pedantic -Wformat -Wno-pedantic-ms-format" } */
kono
parents:
diff changeset
7
kono
parents:
diff changeset
8 #define USE_SYSTEM_FORMATS
kono
parents:
diff changeset
9 #include "format.h"
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 enum en1 { A=0, B=1 };
kono
parents:
diff changeset
12 typedef enum { _A=0, _B=1 } en2;
kono
parents:
diff changeset
13
kono
parents:
diff changeset
14 void
kono
parents:
diff changeset
15 foo (int i, long l, long long ll, size_t z, enum en1 e1, en2 e2)
kono
parents:
diff changeset
16 {
kono
parents:
diff changeset
17 printf ("%I32d", i);
kono
parents:
diff changeset
18 printf ("%I32d", l);
kono
parents:
diff changeset
19 printf ("%I32d", e1);
kono
parents:
diff changeset
20 printf ("%I32d", e2);
kono
parents:
diff changeset
21 printf ("%I64x", ll);
kono
parents:
diff changeset
22 printf ("%Ix", z);
kono
parents:
diff changeset
23 }