view gcc/testsuite/gcc.dg/pr56724-3.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* 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" } */
}