summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr56724-3.c
blob: 192d71962a10aa7c7c12dea400acc944fa24f556 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* PR c/56724 */
/* { dg-do compile } */
/* { dg-options "-Wc++-compat" } */

extern void xfer (int, int, unsigned char *);
struct T { int a; } t;

void
call (int x, int y, void *arg)
{
  unsigned char *uc = arg; /* { dg-warning "23:request for implicit conversion" } */
  xfer (x, y, arg); /* { dg-warning "15:request for implicit conversion" } */
  xfer (x, y, t); /* { dg-error "15:incompatible type for" } */
}