Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/format/c2x-strftime-1.c @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | |
children |
line wrap: on
line source
/* Test for strftime formats. Formats using C2x features. */ /* { dg-do compile } */ /* { dg-options "-std=c2x -pedantic -Wformat" } */ #include "format.h" void foo (char *s, size_t m, const struct tm *tp) { strftime (s, m, "%Ob", tp); strftime (s, m, "%OB", tp); /* It's not clear that %h equivalence to %b means %Oh is equivalent to %Ob; here we expect %Oh to be diagnosed. */ strftime (s, m, "%Oh", tp); /* { dg-warning "flag|modifier" "bad %Oh" } */ }