gcc/testsuite/gcc.dg/Wincompatible-pointer-types-4.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-std=c90 -pedantic-errors" } */ |
| 3 | |
| 4 | void * |
| 5 | f1 (int flag) |
| 6 | { |
| 7 | return flag ? __builtin_memcpy : __builtin_memcmp; /* { dg-warning "pointer type mismatch in conditional expression \\\[-Wincompatible-pointer-types\\\]" } */ |
| 8 | /* { dg-note "first expression has type 'void \\* \\(\\*\\)\\(void \\*," "" { target *-*-* } .-1 } */ |
| 9 | /* { dg-note "second expression has type 'int \\(\\*\\)\\(const void \\*," "" { target *-*-* } .-2 } */ |
| 10 | } |