view gcc/testsuite/gcc.dg/pr79677.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* 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;
}