blob: 5ae7f303e079259715c60e42dbc2217b88432629 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
/* Test comparisons of pointers to complete and incomplete types are
diagnosed in C99 mode: -pedantic-errors. */
/* { dg-do compile } */
/* { dg-options "-std=c99 -pedantic-errors" } */
int
f (int (*p)[], int (*q)[3])
{
return p < q; /* { dg-error "complete and incomplete" } */
}
int
f2 (int (*p)[], int (*q)[3])
{
return p <= q; /* { dg-error "complete and incomplete" } */
}
int
f3 (int (*p)[], int (*q)[3])
{
return p > q; /* { dg-error "complete and incomplete" } */
}
int
f4 (int (*p)[], int (*q)[3])
{
return p >= q; /* { dg-error "complete and incomplete" } */
}
int
g (int (*p)[], int (*q)[3])
{
return q < p; /* { dg-error "complete and incomplete" } */
}
int
g2 (int (*p)[], int (*q)[3])
{
return q <= p; /* { dg-error "complete and incomplete" } */
}
int
g3 (int (*p)[], int (*q)[3])
{
return q > p; /* { dg-error "complete and incomplete" } */
}
int
g4 (int (*p)[], int (*q)[3])
{
return q >= p; /* { dg-error "complete and incomplete" } */
}
|