1 // RUN: %clang_cc1 -fsyntax-only -verify -std=c99 -Wc11-extensions %s
2 // RUN: %clang_cc1 -fsyntax-only -verify -std=c89 -Wc11-extensions %s
4 int incomplete
[]; // expected-warning {{tentative array definition assumed to have one element}}
7 int test_comparison_between_incomplete_and_complete_pointer(void) {
8 return (&incomplete
< &complete
) && // expected-warning {{pointer comparisons before C11 need to be between two complete or two incomplete types; 'int (*)[]' is incomplete and 'int (*)[6]' is complete}}
9 (&incomplete
<= &complete
) && // expected-warning {{pointer comparisons before C11 need to be between two complete or two incomplete types; 'int (*)[]' is incomplete and 'int (*)[6]' is complete}}
10 (&incomplete
> &complete
) && // expected-warning {{pointer comparisons before C11 need to be between two complete or two incomplete types; 'int (*)[]' is incomplete and 'int (*)[6]' is complete}}
11 (&incomplete
>= &complete
) && // expected-warning {{pointer comparisons before C11 need to be between two complete or two incomplete types; 'int (*)[]' is incomplete and 'int (*)[6]' is complete}}
12 (&incomplete
== &complete
) &&
13 (&incomplete
!= &complete
);