2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / gcc.dg / format / nonlit-3.c
blobce94c8c36683f965acc59d0a82c65ababab35e1a
1 /* Test for warnings for non-string-literal formats. Test for strftime formats. */
2 /* Origin: Joseph Myers <jsm28@cam.ac.uk> */
3 /* { dg-do compile } */
4 /* { dg-options "-std=gnu99 -Wformat -Wformat-nonliteral" } */
6 #include "format.h"
8 void
9 foo (char *s, size_t m, const struct tm *tp, char *fmt)
11 strftime (s, m, fmt, tp); /* { dg-warning "format string" "non-literal" } */