voidf1(double);// expected-note{{previous declaration is here}}
{
intf1(int);// expected-error{{conflicting types for 'f1'}}
}
}
}
}
externvoidg3(int);// expected-note{{previous declaration is here}}
staticvoidg3(intx){}// expected-error{{static declaration of 'g3' follows non-static declaration}}
voidtest2(){
externintf2;// expected-note 2 {{previous definition is here}}
{
voidf2(int);// expected-error{{redefinition of 'f2' as different kind of symbol}}
}
{
intf2;
{
voidf2(int);// expected-error{{redefinition of 'f2' as different kind of symbol}}
}
}
}
// <rdar://problem/6127293>
intouter1(int);// expected-note{{previous declaration is here}}
structouter3{};
intouter4(int);
intouter5;// expected-note{{previous definition is here}}
int*outer7(int);
voidouter_test(){
intouter1(float);// expected-error{{conflicting types for 'outer1'}}
intouter2(int);// expected-note{{previous declaration is here}}
intouter3(int);// expected-note{{previous declaration is here}}
intouter4(int);// expected-note{{previous declaration is here}}
intouter5(int);// expected-error{{redefinition of 'outer5' as different kind of symbol}}
int*outer6(int);// expected-note{{previous declaration is here}}
int*outer7(int);
intouter8(int);
int*ip7=outer7(6);
}
intouter2(float);// expected-error{{conflicting types for 'outer2'}}
intouter3(float);// expected-error{{conflicting types for 'outer3'}}
intouter4(float);// expected-error{{conflicting types for 'outer4'}}
voidouter_test2(intx){
int*ip=outer6(x);// expected-warning{{use of out-of-scope declaration of 'outer6'}}
int*ip2=outer7(x);
}
voidouter_test3(){
int*(*fp)(int)=outer8;// expected-error{{use of undeclared identifier 'outer8'}}
}
staticfloatouter8(float);// okay
enume{e1,e2};
// GNU extension: prototypes and K&R function definitions
intisroot(shortx,// expected-note{{previous declaration is here}}
enume);
intisroot(x,y)
shortx;// expected-warning{{promoted type 'int' of K&R function parameter is not compatible with the parameter type 'short' declared in a previous prototype}}