diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr37186.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/pr37186.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr37186.c b/gcc/testsuite/gcc.dg/pr37186.c new file mode 100644 index 000000000..bf37757f8 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr37186.c @@ -0,0 +1,9 @@ +/* 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" } */ +} |