annotate gcc/testsuite/gcc.dg/format/ms_c99-strftime-2.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Test for strftime formats. Rejection of extensions in pedantic mode. */
kono
parents:
diff changeset
2 /* Origin: Joseph Myers <jsm28@cam.ac.uk> */
kono
parents:
diff changeset
3 /* { dg-do compile { target { *-*-mingw* } } } */
kono
parents:
diff changeset
4 /* { dg-options "-std=iso9899:1999 -pedantic -Wformat" } */
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 #define USE_SYSTEM_FORMATS
kono
parents:
diff changeset
7 #include "format.h"
kono
parents:
diff changeset
8
kono
parents:
diff changeset
9 void
kono
parents:
diff changeset
10 foo (char *s, size_t m, const struct tm *tp)
kono
parents:
diff changeset
11 {
kono
parents:
diff changeset
12 /* %P is a lowercase version of %p. */
kono
parents:
diff changeset
13 strftime (s, m, "%P", tp); /* { dg-warning "unknown" "strftime %P" } */
kono
parents:
diff changeset
14 /* %k is %H but padded with a space rather than 0 if necessary. */
kono
parents:
diff changeset
15 strftime (s, m, "%k", tp); /* { dg-warning "unknown" "strftime %k" } */
kono
parents:
diff changeset
16 /* %l is %I but padded with a space rather than 0 if necessary. */
kono
parents:
diff changeset
17 strftime (s, m, "%l", tp); /* { dg-warning "unknown" "strftime %l" } */
kono
parents:
diff changeset
18 /* %s is the number of seconds since the Epoch. */
kono
parents:
diff changeset
19 strftime (s, m, "%s", tp); /* { dg-warning "unknown" "strftime %s" } */
kono
parents:
diff changeset
20 }