blob: deb51f50ea4866d7096a884fcf9cefad45a9a35e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
/* Test for the warning about external functions with non-global
types. In -traditional mode, these functions are globally visible
even if declared in an inner scope, so their return types should
also be visible. */
/* { dg-do compile } */
/* { dg-options -traditional } */
/* { dg-warning "-traditional is deprecated" "deprecation warning" { target *-*-* } 0 } */
int
main ()
{
struct foo { int a, b; };
extern struct foo *bar(); /* { dg-warning "type of external" "good warn" } */
extern int baz(); /* { dg-bogus "type of external" "bad warn" } */
return 0;
}
|