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

#define USE_SYSTEM_FORMATS
#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 *-*-* } 12 } */
}