libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / c99-compare-incomplete-2.c
blob5ae7f303e079259715c60e42dbc2217b88432629
1 /* Test comparisons of pointers to complete and incomplete types are
2 diagnosed in C99 mode: -pedantic-errors. */
3 /* { dg-do compile } */
4 /* { dg-options "-std=c99 -pedantic-errors" } */
6 int
7 f (int (*p)[], int (*q)[3])
9 return p < q; /* { dg-error "complete and incomplete" } */
12 int
13 f2 (int (*p)[], int (*q)[3])
15 return p <= q; /* { dg-error "complete and incomplete" } */
18 int
19 f3 (int (*p)[], int (*q)[3])
21 return p > q; /* { dg-error "complete and incomplete" } */
24 int
25 f4 (int (*p)[], int (*q)[3])
27 return p >= q; /* { dg-error "complete and incomplete" } */
30 int
31 g (int (*p)[], int (*q)[3])
33 return q < p; /* { dg-error "complete and incomplete" } */
36 int
37 g2 (int (*p)[], int (*q)[3])
39 return q <= p; /* { dg-error "complete and incomplete" } */
42 int
43 g3 (int (*p)[], int (*q)[3])
45 return q > p; /* { dg-error "complete and incomplete" } */
48 int
49 g4 (int (*p)[], int (*q)[3])
51 return q >= p; /* { dg-error "complete and incomplete" } */