view gcc/testsuite/gcc.dg/pr37186.c @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* PR 37186 */
/* { dg-do compile } */
/* { dg-options "-Wall -Werror -Wno-error=pointer-sign" } */

int foo(signed char *); /* { dg-message "note: expected 'signed char \\*' but argument is of type 'unsigned char \\*'" } */
int bar(unsigned char *p)
{
  return foo(p); /* { dg-warning "pointer targets in passing argument 1 of 'foo' differ in signedness" } */
}