1 /* { dg-options "-Wformat" } */
3 int main (int argc
, char **argv
)
8 unsigned char uc
[] = "%i";
9 const char cc
[] = "%i";
10 const unsigned char cuc
[] = "%i";
12 __builtin_sprintf(buf
, (char *)c
, 1);
13 __builtin_sprintf(buf
, (char *)uc
, 1);
14 __builtin_sprintf(buf
, (char *)cc
, 1);
15 __builtin_sprintf(buf
, (char *)cuc
, 1); /* { dg-warning "format string is not an array of type 'char'" } */
16 __builtin_sprintf(buf
, (const char *)L
"foo"); /* { dg-warning "format is a wide character string" } */