summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/format/va-1.c
blob: 5f5eeab4e84736ba4062c33ea83851c005033217 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* Test for strange warning in format checking.  */
/* Origin: Joseph Myers <jsm28@cam.ac.uk> */
/* { dg-do compile } */
/* { dg-options "-Wformat" } */

#include "format.h"

void
foo (void *p)
{
  printf ("%d", p); /* { dg-bogus "va_list" "wrong type in format warning" } */
  /* { dg-warning "format" "format error" { target *-*-* } 11 } */
}