Merged with mainline at revision 128810.
[official-gcc.git] / gcc / testsuite / gcc.dg / 20041213-1.c
blobf7ef30a62f98be0f976f4f035f35d3964af689d6
1 /* { dg-do compile } */
2 /* { dg-options "" } */
3 /* test redeclarations with void and implicit int */
4 extern foo1(); /* { dg-error "previous declaration" } */
5 extern void foo1(); /* { dg-error "conflicting types" } */
7 extern void foo2(); /* { dg-error "previous declaration" } */
8 extern foo2(); /* { dg-error "conflicting types" } */
10 void foo3() {} /* { dg-error "previous definition" } */
11 extern foo3(); /* { dg-error "conflicting types" } */
13 extern foo4(); /* { dg-error "previous declaration" } */
14 void foo4() {} /* { dg-error "conflicting types" } */
16 extern void foo5(); /* { dg-warning "previous declaration" } */
17 foo5() {} /* { dg-warning "conflicting types" } */
19 foo6() {} /* { dg-error "previous definition" } */
20 extern void foo6(); /* { dg-error "conflicting types" } */
22 foo7() {} /* { dg-error "previous definition" } */
23 void foo7() {} /* { dg-error "conflicting types" } */
25 void foo8() {} /* { dg-error "previous definition" } */
26 foo8() {} /* { dg-error "conflicting types" } */
28 int use9() { foo9(); } /* { dg-warning "previous implicit declaration" } */
29 extern void foo9(); /* { dg-warning "conflicting types" } */
31 int use10() { foo10(); } /* { dg-warning "previous implicit declaration" } */
32 void foo10() {} /* { dg-warning "conflicting types" } */