testsuite: fix dg-require-* order vs dg-additional-sources
[official-gcc.git] / gcc / testsuite / gcc.dg / format / c23-strftime-1.c
blob80f2788b682e4aaabda528d083c36b2095a79140
1 /* Test for strftime formats. Formats using C23 features. */
2 /* { dg-do compile } */
3 /* { dg-options "-std=c23 -pedantic -Wformat" } */
5 #include "format.h"
7 void
8 foo (char *s, size_t m, const struct tm *tp)
10 strftime (s, m, "%Ob", tp);
11 strftime (s, m, "%OB", tp);
12 /* It's not clear that %h equivalence to %b means %Oh is equivalent
13 to %Ob; here we expect %Oh to be diagnosed. */
14 strftime (s, m, "%Oh", tp); /* { dg-warning "flag|modifier" "bad %Oh" } */