view gcc/testsuite/c-c++-common/pr68833-2.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
line wrap: on
line source

/* PR c/68833 */
/* { dg-do compile } */
/* { dg-options "-Werror=missing-format-attribute" } */

#include <stdarg.h>

void
foo (const char *fmt, ...)
{
  va_list ap;
  va_start (ap, fmt);
  __builtin_vprintf (fmt, ap); /* { dg-error "candidate" "printf attribute warning" } */
  va_end (ap);
}

/* { dg-prune-output "treated as errors" } */