aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/warn/format5.C
blob: e219f88109269ca0902c2321a9082d7c958d8254 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// PR c++/38980
// { dg-options "-Wformat" }

extern "C"
int printf(const char *format, ...) __attribute__((format(printf, 1, 2) ));

const char fmt1[] = "Hello, %s";

void f()
{
  printf(fmt1, 3); // { dg-warning "expects argument" }
}