1 /* { dg-do compile } */
2 /* { dg-options "-fshow-column -std=gnu89" } */
3 /* test redeclarations with void and implicit int */
4 extern foo1(); /* { dg-message "8:note: previous declaration" } */
5 extern void foo1(); /* { dg-error "13:conflicting types" } */
7 extern void foo2(); /* { dg-message "13:note: previous declaration" } */
8 extern foo2(); /* { dg-error "8:conflicting types" } */
10 void foo3() {} /* { dg-message "6:note: previous definition" } */
11 extern foo3(); /* { dg-error "8:conflicting types" } */
13 extern foo4(); /* { dg-message "8:note: previous declaration" } */
14 void foo4() {} /* { dg-error "6:conflicting types" } */
16 extern void foo5(); /* { dg-message "13:note: previous declaration" } */
17 foo5() {} /* { dg-warning "1:conflicting types" } */
19 foo6() {} /* { dg-message "1:note: previous definition" } */
20 extern void foo6(); /* { dg-error "13:conflicting types" } */
22 foo7() {} /* { dg-message "1:note: previous definition" } */
23 void foo7() {} /* { dg-error "6:conflicting types" } */
25 void foo8() {} /* { dg-message "6:note: previous definition" } */
26 foo8() {} /* { dg-error "1:conflicting types" } */
28 int use9() { foo9(); } /* { dg-message "note: previous implicit declaration" } */
29 extern void foo9(); /* { dg-warning "13:conflicting types" } */
31 int use10() { foo10(); } /* { dg-message "note: previous implicit declaration" } */
32 void foo10() {} /* { dg-warning "6:conflicting types" } */