[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / Sema / complete-incomplete-pointer-relational-c99.c
blob65cf6a3e02e20775919e7afce3744c7a456fe90c
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}}
5 int complete[6];
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);