OSDN Git Service

* c-decl.c (pushdecl): Invert sense of test for non-global types.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / ext-glob.c
1 /* Test for the warning about external functions with non-global
2    types.  In -traditional mode, these functions are globally visible
3    even if declared in an inner scope, so their return types should
4    also be visible.  */
5
6 /* { dg-do compile } */
7 /* { dg-options -traditional } */
8
9 int
10 main ()
11 {
12   struct foo { int a, b; };
13
14   extern struct foo *bar();  /* { dg-warning "type of external" "good warn" } */
15   extern int baz();          /* { dg-bogus   "type of external" "bad warn"  } */
16
17   return 0;
18 }