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" } */
7 f (int (*p
)[], int (*q
)[3])
9 return p
< q
; /* { dg-error "complete and incomplete" } */
13 f2 (int (*p
)[], int (*q
)[3])
15 return p
<= q
; /* { dg-error "complete and incomplete" } */
19 f3 (int (*p
)[], int (*q
)[3])
21 return p
> q
; /* { dg-error "complete and incomplete" } */
25 f4 (int (*p
)[], int (*q
)[3])
27 return p
>= q
; /* { dg-error "complete and incomplete" } */
31 g (int (*p
)[], int (*q
)[3])
33 return q
< p
; /* { dg-error "complete and incomplete" } */
37 g2 (int (*p
)[], int (*q
)[3])
39 return q
<= p
; /* { dg-error "complete and incomplete" } */
43 g3 (int (*p
)[], int (*q
)[3])
45 return q
> p
; /* { dg-error "complete and incomplete" } */
49 g4 (int (*p
)[], int (*q
)[3])
51 return q
>= p
; /* { dg-error "complete and incomplete" } */