[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / gcc.dg / pr67784-2.c
blobde3b1c89a89cd267bba0327be0d6728bdac8b605
1 /* PR c/67784 */
2 /* { dg-do compile } */
3 /* { dg-options "" } */
5 int T;
7 void
8 fn1 (void)
10 for (typedef int T;;) /* { dg-error "declaration of non-variable" } */
11 if (1)
13 T *x; /* { dg-error "undeclared" } */
16 void
17 fn2 (void)
19 for (typedef int T;;) /* { dg-error "declaration of non-variable" } */
20 if (1)
21 T = 1; /* { dg-error "expected expression" } */
22 T *x; /* { dg-error "undeclared" } */
25 void
26 fn3 (void)
28 for (typedef int T;;) /* { dg-error "declaration of non-variable" } */
29 if (1)
32 T *x; /* { dg-error "undeclared" } */
35 void
36 fn4 (void)
38 for (typedef int T;;) /* { dg-error "declaration of non-variable" } */
39 if (1)
42 T *x; /* { dg-error "undeclared" } */
45 void
46 fn5 (void)
48 for (typedef int T;;) /* { dg-error "declaration of non-variable" } */
49 if (1)
51 else
53 T *x; /* { dg-error "undeclared" } */