brintos

brintos / llvm-project-archived public Read only

0
0
Text · 382 B · 1c81a78 Raw
17 lines · c
1// RUN: %clang_cc1 -fsyntax-only -std=c99 -verify -pedantic %s2 3int x[10];4int x[] = {1,2,3};5int testx[(sizeof(x) == sizeof(int) * 10) ? 1 : -1];6 7int (*a)(int (*x)[10], int (*y)[]);8int (*a)(int (*x)[], int (*y)[5]);9void b(void) {10  int x[10], y[5];11  a(&x, &y);12  a(&y, &y); // expected-error {{incompatible pointer}}13  a(&x, &x); // expected-error {{incompatible pointer}}14}15 16 17