summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/20041213-1.c
blob: f7ef30a62f98be0f976f4f035f35d3964af689d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* { dg-do compile } */
/* { dg-options "" } */
/* test redeclarations with void and implicit int */
extern foo1(); /* { dg-error "previous declaration" } */
extern void foo1(); /* { dg-error "conflicting types" } */

extern void foo2(); /* { dg-error "previous declaration" } */
extern foo2(); /* { dg-error "conflicting types" } */

void foo3() {} /* { dg-error "previous definition" } */
extern foo3(); /* { dg-error "conflicting types" } */

extern foo4(); /* { dg-error "previous declaration" } */
void foo4() {} /* { dg-error "conflicting types" } */

extern void foo5(); /* { dg-warning "previous declaration" } */
foo5() {} /* { dg-warning "conflicting types" } */

foo6() {} /* { dg-error "previous definition" } */
extern void foo6(); /* { dg-error "conflicting types" } */

foo7() {} /* { dg-error "previous definition" } */
void foo7() {} /* { dg-error "conflicting types" } */

void foo8() {} /* { dg-error "previous definition" } */
foo8() {} /* { dg-error "conflicting types" } */

int use9() { foo9(); } /* { dg-warning "previous implicit declaration" } */
extern void foo9(); /* { dg-warning "conflicting types" } */

int use10() { foo10(); } /* { dg-warning "previous implicit declaration" } */
void foo10() {} /* { dg-warning "conflicting types" } */