1254885Sdumbbell/* Test for strftime formats. Rejection of extensions in pedantic mode. */ 2254885Sdumbbell/* Origin: Joseph Myers <jsm28@cam.ac.uk> */ 3254885Sdumbbell/* { dg-do compile { target { *-*-mingw* } } } */ 4254885Sdumbbell/* { dg-options "-std=iso9899:1999 -pedantic -Wformat" } */ 5254885Sdumbbell 6254885Sdumbbell#define USE_SYSTEM_FORMATS 7254885Sdumbbell#include "format.h" 8254885Sdumbbell 9254885Sdumbbellvoid 10254885Sdumbbellfoo (char *s, size_t m, const struct tm *tp) 11254885Sdumbbell{ 12254885Sdumbbell /* %P is a lowercase version of %p. */ 13254885Sdumbbell strftime (s, m, "%P", tp); /* { dg-warning "unknown" "strftime %P" } */ 14254885Sdumbbell /* %k is %H but padded with a space rather than 0 if necessary. */ 15254885Sdumbbell strftime (s, m, "%k", tp); /* { dg-warning "unknown" "strftime %k" } */ 16254885Sdumbbell /* %l is %I but padded with a space rather than 0 if necessary. */ 17254885Sdumbbell strftime (s, m, "%l", tp); /* { dg-warning "unknown" "strftime %l" } */ 18254885Sdumbbell /* %s is the number of seconds since the Epoch. */ 19254885Sdumbbell strftime (s, m, "%s", tp); /* { dg-warning "unknown" "strftime %s" } */ 20254885Sdumbbell} 21254885Sdumbbell