aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr79677.c
blob: 53a3176453a64598134c7967bbc168c5ee0c66cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* PR c/79677 */
/* { dg-do compile } */
/* { dg-options "-Wformat -Werror=format-security -Wformat" } */
/* { dg-message "some warnings being treated as errors" "" { target *-*-* } 0 } */

void foo (char *);

int
main ()
{
  char s[10] = "%s";
  foo (s);
  __builtin_printf (s);	/* { dg-error "format not a string literal and no format arguments" } */
  return 0;
}