blob: dfafc39145e454f7b79a7851cfa5de870248ab49 (
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. */
/* { dg-do compile } */
/* { dg-options "-std=c99 -pedantic" } */
int
f (int (*p)[], int (*q)[3])
{
return p < q; /* { dg-warning "complete and incomplete" } */
}
int
f2 (int (*p)[], int (*q)[3])
{
return p <= q; /* { dg-warning "complete and incomplete" } */
}
int
f3 (int (*p)[], int (*q)[3])
{
return p > q; /* { dg-warning "complete and incomplete" } */
}
int
f4 (int (*p)[], int (*q)[3])
{
return p >= q; /* { dg-warning "complete and incomplete" } */
}
int
g (int (*p)[], int (*q)[3])
{
return q < p; /* { dg-warning "complete and incomplete" } */
}
int
g2 (int (*p)[], int (*q)[3])
{
return q <= p; /* { dg-warning "complete and incomplete" } */
}
int
g3 (int (*p)[], int (*q)[3])
{
return q > p; /* { dg-warning "complete and incomplete" } */
}
int
g4 (int (*p)[], int (*q)[3])
{
return q >= p; /* { dg-warning "complete and incomplete" } */
}
|