OSDN Git Service

PR tree-optimization/51799
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / decl-9.c
1 /* { dg-do compile } */
2 /* { dg-options "-std=gnu89" } */
3
4 w *x; /* { dg-error "unknown type name 'w'" } */
5
6 int z;    /* { dg-message "previous declaration of 'z'" } */
7 y         /* { dg-error "unknown type name 'y'" } */
8   * z;    /* { dg-error "conflicting " } */
9
10 int f1()
11 {
12   int d, e;
13   d * e; /* { dg-bogus "unknown type name 'd'" } */
14   g * h; /* { dg-error "unknown type name 'g'" } */
15   g i;   /* { dg-error "unknown type name 'g'" } */
16 }
17
18 typedef int a;
19
20 int f2()
21 {
22 b: a: ; /* { dg-bogus "a label can only be part of a statement" } */
23 c: d e; /* { dg-error "a label can only be part of a statement" } */
24 /* { dg-error "unknown type name 'd'" "" { target *-*-* } 23 } */
25    ;
26 }
27
28 void *f3()
29 {
30   return x; /* { dg-bogus "'x' undeclared" } */
31 }
32