Document gcov-io (PR gcov-profile/84735).
[official-gcc.git] / gcc / testsuite / gcc.dg / pr25801.c
blob10b53d33e19a215671259d38c1867d9249d5fe0c
1 /* PR c/25801 */
2 /* { dg-do compile } */
3 /* { dg-options "-std=c99" } */
5 int (*a)[];
6 struct S *s;
7 union U *u;
8 enum E *e;
10 void
11 f (void)
13 a++; /* { dg-error "increment of pointer to an incomplete type" } */
14 ++a; /* { dg-error "increment of pointer to an incomplete type" } */
15 a--; /* { dg-error "decrement of pointer to an incomplete type" } */
16 --a; /* { dg-error "decrement of pointer to an incomplete type" } */
17 a += 1; /* { dg-error "invalid use of array with unspecified bounds" } */
18 a -= 1; /* { dg-error "invalid use of array with unspecified bounds" } */
19 a - a; /* { dg-error "arithmetic on pointer to an incomplete type" } */
21 s++; /* { dg-error "increment of pointer to an incomplete type" } */
22 ++s; /* { dg-error "increment of pointer to an incomplete type" } */
23 s--; /* { dg-error "decrement of pointer to an incomplete type" } */
24 --s; /* { dg-error "decrement of pointer to an incomplete type" } */
25 s += 1; /* { dg-error "invalid use of undefined type" } */
26 s -= 1; /* { dg-error "invalid use of undefined type" } */
27 s - s; /* { dg-error "arithmetic on pointer to an incomplete type" } */
29 u++; /* { dg-error "increment of pointer to an incomplete type" } */
30 ++u; /* { dg-error "increment of pointer to an incomplete type" } */
31 u--; /* { dg-error "decrement of pointer to an incomplete type" } */
32 --u; /* { dg-error "decrement of pointer to an incomplete type" } */
33 u += 1; /* { dg-error "invalid use of undefined type" } */
34 u -= 1; /* { dg-error "invalid use of undefined type" } */
35 u - u; /* { dg-error "arithmetic on pointer to an incomplete type" } */
37 e++; /* { dg-error "increment of pointer to an incomplete type" } */
38 ++e; /* { dg-error "increment of pointer to an incomplete type" } */
39 e--; /* { dg-error "decrement of pointer to an incomplete type" } */
40 --e; /* { dg-error "decrement of pointer to an incomplete type" } */
41 e += 1; /* { dg-error "invalid use of undefined type" } */
42 e -= 1; /* { dg-error "invalid use of undefined type" } */
43 e - e; /* { dg-error "arithmetic on pointer to an incomplete type" } */